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

hsx hushxixi at 163.com
Mon Sep 6 10:05:45 CEST 2010


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.
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.
 
Now, I also would like to run NUT/OS on the AT91SAM9X-EK (AT91SAM9XE512), but can not succeed.
Porting NutOS to the AT91SAM9XE512, I chose at91sam9xe512_ram.ld and crtat91sam9xe512_ram.S as linker script / startup code. I also use ethernut50c.conf as a starting point.

Compile NutOS for the UART example and Upload Uart.bin to the AT91SAM9X-EK SDRAM via SAM-BA.
The main function is the same as running on the AT91SAM9260-EK.
But i see some message is "ABCDEABCDEABCDE..."on DBGUART, Never-ending. I can't see the message "Nut/OS 4.9.9.0 HTTP Daemon..."on DBGUART. I know that the init code is run fail.I do not know what is the wrong and how to modify it.
I need help.
 
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 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
 
Compile NutOS for the UART example and Upload Uart.bin to the AT91SAM9X-EK SDRAM via SAM-BA.The main function is the same as running on the AT91SAM9260-EK.
I can't see anything on DBGUART.
So I don't know how to do the next step. I want to know that which is the right method?
I hope to get help.
I would also like to say is that My goal is Nut/OS can run on the AT91SAM9X-EK (AT91SAM9XE512).
 
Any help will be appreciated.
Best Regards,
hushxixi.


More information about the En-Nut-Discussion mailing list