[En-Nut-Discussion] How to use NUT/OS in the AT91SAM9XE512 platform ?

Ulrich Prinz uprinz2 at netscape.net
Tue Aug 31 22:58:12 CEST 2010


Hi!

Porting Nut/OS to another SAM-series chip should not be that difficult. 
Atmel uses more or less the same peripherals on all chips of a series. 
The part that is interesting for you should be to find in the 
arch/arm/ldscripts and th other files like startup*.*.

My way to test the boot procedure would be to do the following:

Build Nut/OS for the most compatible platform. Before that check for 
correct memory settings in nuconfig.
Build nutos to nutbld-myarm-gcc and create the application directories 
under nutapp-myarm-gcc.
Go to nutapp-myarm-gcc/uart example and build it.
run arm-none-eabi-size -A -x uart.elf

Now check all the records at the beginning. They tell about text, data 
and bss. The locations should match with your flash for text+data and 
for you RAM with bss.
If there is a mismatch:
1) Check again for the correct address settings in nutconfig
2) Check for the used *.ld script (linker script) and see if needs 
changes. Make a backup of the script and modify the original. This is 
easier for now as you don't have to creat a new CPU in the nutconfig 
system right now.

Now rebuild everything and check again with arm-none-eabi-size... (older 
compiler uses arm-elf-size)
If it matches but doesn't start you have to dive a bit deeper.

I heared that there are other ways to see if and how a system starts, 
but I prefer to use a combination of JTAG, OpenOCD and Insight for GDB. 
So you can single-step through the startup code. With that you should 
find incorrect setups of Clock-Sources, PLLs and other things fast.
You can even check the registers of the memory controller and so on. 
After a certain point they should have values that match closely to what 
you read in the data-sheet.

This is only a rough summary for what to do next. Yust keep asking, if 
you got hung in one of the steps before. I am doing pretty much the same 
thing for Nut/OS right now, but for a whole new architecture of chips... 
The CortexM3. And using the debugger got me really fast really far.

Just a little problem left in the task-switcher or memory handler... 
I'll find it.

Best regards,
Ulrich



Am 31.08.2010 15:13, schrieb hsx:
>
> I have made an application that will run NUT/OS in the AT91SAM9XE512 platform.
> I am using At91sam9xe-EK evaluation kit for test and SAM-BA v.2.8 for
> loading the application.
>
> Now,it is not working when booting from NandFlash¡¢SDRam or internal flash.
> I want to know how to transplant the NUT/OS in the AT91SAM9XE512 platform.
>
> Any help will be appreciated.
> Best Regards,
> hushxixi.
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion


More information about the En-Nut-Discussion mailing list