Posts Tagged 'Embedded Systems'

Embedded RTP under µClinux on Nios2

I’m working on an application with PJMEDIA under uClinux on Nios2 environment. I have a stream audio with codec L16 48000 stereo and mono.This works good.

[pjsip] Resampling module add

It’s good to hear pjsip and pjmedia being ported on different embedded systems. The quote above relates to Nios II from Altera. Nowadays, running a media stacks such as RTP is very important for embedded processors such as Nios2.

If you have any other experience in using our protocol stacks on other embedded devices, please feel free to share it!

Easy Setup of the Blackfin BF537-STAMP Development Board

The setup of a Blackfin BF537-STAMP board involves plugging in the AD1836A audio board, AC Adapter, network cable, serial cable, and using Hyperterminal to monitor boot-up sequence of the BF537 board.

This post builds on previous posts on porting pjsip to Blackfin and assembling components for embedded systems programming.

I will start with hardware setup as it is the easiest, so hopefully success at this will motivate you for the software setup, which can be, to use a technical term, fiddly.

Hardware setup

  1. Unpack the BF537 board and audio daughterboard.
  2. Plug the audio daughterboard to the mainboard, using the SPORT 0 connector. Match up pin 1 on both boards. You will end up with a dangling audio board, put some support under the audio board so it doesn’t strain the SPORT connector.
  3. Connect the BF537 board to the development PC using the serial and ethernet cable.
  4. Using HyperTerminal, connect to the serial port where the connecting cable is plugged in. As advised by the Blackfin uClinux docs website, use these setting:
  5. HyperTerminal Settings

  6. Plugin the AC adapter to the BF537 board. You should see lights turning on the board itself, and uClinux should be booting on your HyperTerminal console. You will end up in the uClinux prompt.
  7. Congratulations, you’ve successfully setup an embedded system! (Well, an embedded development environment really)

Software setup

The main steps in setting the tools needed are:

  1. Setup coLinux from Blackfin uClinux. Includes setting up networking so coLinux and BF537 board can see each other.
  2. Replace old toolchain in coLinux.
  3. In coLinux, download the uClinux distribution and U-Boot that matches the toolchain version.
  4. Replace U-Boot bootloader on BF537 board.
  5. Setup U-Boot to boot the uClinux downloaded in step 3.
  6. Use tftp server on coLinux so we can transfer file from host PC to BF537 board.

Steps in greater detail (with links to documentation as appropriate):

  1. Setup coLinux. I used the one available on Blackfin uClinux site and followed instructions from the documentation site.
  2. If your installation is successful you should be able to login to coLinux.
  3. Replacing the tool chain involves deleting the old one using apt-get remove and installing the new one using alien.
  4. Releases in Blackfin uClinux are named in the format of 2006R2, 2007R1 etc. It is important to know this because you need to have the same release of these software
    1. Toolchain
    2. uClinux
    3. U-Boot
  5. Upgrade the shipped U-Boot on the BF537 board with the latest one.
  6. Boot uClinux by downloading the image to BF 537 board.
  7. Now you can try the Hello World application.
  8. When you can compile and run the Hello World application, you are all set to begin real development!

Any questions or problems, just leave a comment.

Porting pjsip to embedded Linux on Blackfin DSP

Over the next few posts, I will do a walkthrough on porting pjsip to embedded Linux (specifically uClinux) on the Blackfin Digital Signal Processing (DSP) processors from Analog Devices. Along the way, I hope to give a few insight into programming embedded systems in general.

Blackfin (r) Logo

Why Blackfin Processors?

  • Popular. It can run uClinux as an embedded operating system.
    • uClinux ™ Logo
    • There is already the Linphone Blackfin port, so I know SIP and media works.
    • Recently Global IP Solutions (GIPS) has ported and optimized its VoiceEngine Embedded software to Blackfin processors as well.
  • Well documented. The Blackfin on uClinux site has tons of free software and documentation. Most importantly GCC toolchain (compiler, linkers, debuggers) is available and supported.
  • Somewhat exotic. Although probably not as exotic as pure DSP processors such as the TMS320 series from Texas Instruments, but still it is an embedded systems processor. In contrast processors based on x86 are more like small PCs, therefore expensive in terms of cost and power usage.
  • Affordable development board readily available. Relatively speaking, of course.
    • I was able to buy the BF537 STAMP and audio card for a total of £276 from Digi-Key, that includes shipping (to UK), customs, and taxes. I will detail what you need exactly in another post.
    • Here’s a tip if ordering from the UK: Don’t choose the Global Express Mail option. Although it saves about £20, it takes way too long (almost 2 weeks) and the ParcelForce handling here, well… can be improved.

Initial Approach

For this exercise, I have chosen Windows as my development machine. Although using Linux is more straight forward, I am using this porting effort as an excuse to try out new stuff like coLinux. Other than that , I will try to stick as much as possible to the suggested tools.

What next?

I will describe in more detail about getting the goods and preparing your development PC. After that we should be well on our way to start development.

If you have any thoughts on how this should be structured, or any other additional information you’d like to see covered, just leave a comment and I can try to fit it in.


Follow on

Subscribe to blog updates

View Perry Ismangil's profile on LinkedIn

a

RSS PJSIP builds

  • An error has occurred; the feed is probably down. Try again later.

Follow

Get every new post delivered to your Inbox.

Join 826 other followers