[En-Nut-Discussion] Porting NutOS on the AT91SAM9X-EK

Ulrich Prinz uprinz2 at netscape.net
Mon Sep 6 23:00:48 CEST 2010


Hi!

Am 06.09.2010 10:05, schrieb hsx:
> Hi: Thank you for your reply!
>
> Perhaps I don't know how to express the question, so it leads you
> don't know what to do.

That sometimes happens :) Guess, we're both not native english speakers.

> My goal is Nut/OS can run on the AT91SAM9X-EK (AT91SAM9XE512). Now I
> re-describe the problem: I have two boards, namely the AT91SAM9260-EK
> and AT91SAM9X-EK (AT91SAM9XE512).I want to run the NUT/OS in both the
> boards.First of all, I would like to run it in SDRAM. Now I can
> achieve to run it on the AT91SAM9260-EK,I chose at91sam9260_ram.ld
> and crtat91sam9260_ram.S as linker script / startup code. I also use
> at91sam9260-ek.conf as a starting point. Compile NutOS for the UART
> example and Upload Uart.bin to the AT91SAM9260-EK SDRAM via SAM-BA.
>
> The UART example's main function: int main(void) { uint32_t baud =
> 115200; NutRegisterDevice(&DEV_DEBUG, 0, 0); freopen(DEV_DEBUG_NAME,
> "w", stdout); _ioctl(_fileno(stdout), UART_SETSPEED,&baud);
>
> for(;;) { printf("\n\nNut/OS %s HTTP Daemon...",
> NutVersionString()); } return 0; }
>
> The Uart example is run ok,I see some message is "Nut/OS 4.9.9.0 HTTP
> Daemon..."on DBGUART, Never-ending. So I know that NUT/OS is working
> normally on the AT91SAM9260-EK.
>
So far it seems to work fine, I see.

> In your reply,Your suggestion use at91sam9xe512_ram.ld and
> crtat91sam7x512_ram.S as linker script / startup code.I can't find
> the file.I also don't quite understand that why uses
> crtat91sam7x512_ram.S and how to use crtat91sam7x512_ram.S. Can you
> say more.please? I have tried to use it by two methods,but the
> results are fail. One,using Crtat91sam7sex_rom.S content to cover the
> crtat91sam9xe512_ram.S content as startup file, the file name is

Now, this is the part, where it looks like it was to late for me to 
answer any mail. Certainly I would not urge you to use a SAM7 script or 
code for the SAM9. Sorry if I wrote that.
Afaik the SAM9 are not very different to each other. The Ethernut 5 is 
developed on SAM9260 but the final Board carries the SAM9XE cause most 
of the code should be portable. If you need to adapt linker script or 
startup code, take the SAM9260 ones for reference.

> still crtat91sam9xe512_ram.S; The other, using crtat91sam7se512_ram.S
> content to cover the crtat91sam9xe512_ram.S content as startup file,
> the file name is still crtat91sam9xe512_ram.S. Then,Compiling
> NutOS.Two methods's Resulting is the same, following errors:
> C:/ethernut-4.9/nut/arch/arm/init/crtat91sam9xe512_ram.S:176: Error:
> undefined symbol MC_FWS_2R3W used as an immediate value
> C:/ethernut-4.9/nut/arch/arm/init/crtat91sam9xe512_ram.S:241: Error:
> undefined symbol PMC_LOCK used as an immediate value
> C:/ethernut-4.9/nut/arch/arm/init/crtat91sam9xe512_ram.S:258: Error:
> undefined symbol PMC_CSS_PLL_CLK used as an immediate value
> C:/ethernut-4.9/nut/arch/arm/init/crtat91sam9xe512_ram.S:177: Error:
> internal_relocation (type: OFFSET_IMM) not fixed up
> C:/ethernut-4.9/nut/arch/arm/init/crtat91sam9xe512_ram.S:238: Error:
> internal_relocation (type: OFFSET_IMM) not fixed up
>
> so I added those: #define MC_FWS_2R3W   0x00000100 #define PMC_LOCK
> 0x00000004 #define PMC_CSS_PLL_CLK   0x00000003
>
I don't have any details about the SAM9XE at hand. I got a prototype of 
the Ethernut equipped with a SAM9260. Ole should have one with the final 
9XE on it. May be he can help. But take care not to use the startup from 
the 7XE but the 9260 one.

The last new I got was, that he was busy to get uboot loading and 
starting Nut/OS applications but I didn't get any status update about 
that. Sorry.

But that reminds me that I have to call Harald and Ole for some other 
things, so I ask them about that and get back to you. But I am pretty 
sure that they read the list.

Best regards,
Ulrich



More information about the En-Nut-Discussion mailing list