[U-Boot-Users] The problem on porting to similar FADS860 board

Hello list!
I've checked the archives, but have not found anyone using the 860 with my problem.
I have a MPC860 board ported from FADS860 board. ( TEXT_BASE is also 0x2800000, but IMMR is 0x2200000). I have vxworks run OK on it. But when I am porting U-Boot on it. I met booting problem on it.
For Example as following: (ELDK1.0 + U-boot-0.3.0) -------------------------------------------------------- located in /cpu/mpc8xx/start.S .globl _start .extern testLed _start: lis r3, 0x220 /* my IMMR addr is 0x2200000 */ ori r3, r3, 0x0000 mtspr 638, r3 /*IMMR SPR is 638*/
bl testLed /* this is to light LEDs on board(PA0 - PA3)*/ ---------------------------------------------------------- located in /cpu/mpc8xx/cpu_init.c void testLed(void) { int i,k; for(k=0;k<5;k++) { * ( (volatile unsigned short *) (0x2200000 + 0x950) ) = 0xA000; /* light LED */ for (i=0; i<0xFFFF;i++) {;}; * ( (volatile unsigned short *) (0x2200000 + 0x950) ) = 0x0000; /* unlight LED */ for (i=0; i<0xFFFF;i++) {;}; }; };
When I build to *.bin and burn into bootrom flash, after power on, the LEDs of board are not lighting. But, I tested these codes under Vxworks Bootrom code (rominit.S), that's OK.
maybe it is linking problem? I 'm confused. Could you like to help me or give me any comments ?
Thanks in advance! John

Dear John,
in message 001d01c31902$4c141780$844da93d@john you wrote:
I've checked the archives, but have not found anyone using the 860 with my problem.
I have a MPC860 board ported from FADS860 board. ( TEXT_BASE is also 0x2800000, but IMMR is 0x2200000). I have vxworks run OK on it. But when I am porting
Don;t do thiis. There is good reason NOT to chose an IMMR address below 0xF0000000 - at least if you intend to run Linux one day.
For Example as following: (ELDK1.0 + U-boot-0.3.0)
located in /cpu/mpc8xx/start.S .globl _start .extern testLed _start: lis r3, 0x220 /* my IMMR addr is 0x2200000 */ ori r3, r3, 0x0000 mtspr 638, r3 /*IMMR SPR is 638*/
bl testLed /* this is to light LEDs on board(PA0 - PA3)*/
located in /cpu/mpc8xx/cpu_init.c void testLed(void) { int i,k; for(k=0;k<5;k++) {
This cannot work. You added your code much too early, where no stack has been set up yet.
My recommendation is not to change cpu/mpc8xx/start.S if you don't know EXACTLY what you are doing. If you want to insert your own debug code written in C, then you cannot do this before the comment reading "let the C-code set up the rest" (but then you can alos include your code in cpu_init_f().
Also, you should get yourself a BDI2000 so you can debug your system.
Best regards,
Wolfgang Denk

Thank you very much!
But, I built same codes in rominit.S based on Vxworks, the LED is lighting.( codes is following ) What's problem in u-boot? is it possible to change the IMMR address by me? Next, are there any introduction on the file of u-boot.lds or how to modify it according to customized board?
because it is my personal interest in u-boot, so I have no debuger as BDI on hand and only to debug the U-boot using lighting LEDs on board. Is there lower cost debuger to be ordered ?
Next, can anyone help give the used assemble codes to light LED? I'm not familiar with assemble.
any help are appreciated!
-------------------------------------------------------- located in /target/config/my860board/rominit.s _rominit: rominit:
lis r3, 0x220 /* my IMMR addr is 0x2200000 */ ori r3, r3, 0x0000 mtspr 638, r3 /*IMMR SPR is 638*/
bl testLed /* this is to light LEDs on board(PA0 - PA3)*/ -------------------------------------------------------------------------- located in /target/config/all/bootinit.c void testLed(void) { int i,k; for(k=0;k<5;k++) { * ( (volatile unsigned short *) (0x2200000 + 0x950) ) = 0xA000; /* light LED */ for (i=0; i<0xFFFF;i++) {;}; * ( (volatile unsigned short *) (0x2200000 + 0x950) ) = 0x0000; /* unlight LED */ for (i=0; i<0xFFFF;i++) {;}; }; };
----- Original Message ----- From: "Wolfgang Denk" wd@denx.de To: "John" john@gelake.com Cc: u-boot-users@lists.sourceforge.net Sent: Tuesday, May 13, 2003 4:15 PM Subject: Re: [U-Boot-Users] The problem on porting to similar FADS860 board
| Dear John, | | in message 001d01c31902$4c141780$844da93d@john you wrote: | > | > I've checked the archives, but have not found anyone using the 860 with my | > problem. | > | > I have a MPC860 board ported from FADS860 board. ( TEXT_BASE is also 0x2800000, | > but IMMR is 0x2200000). I have vxworks run OK on it. But when I am porting | | Don;t do thiis. There is good reason NOT to chose an IMMR address | below 0xF0000000 - at least if you intend to run Linux one day. | | > For Example as following: (ELDK1.0 + U-boot-0.3.0) | > -------------------------------------------------------- | > located in /cpu/mpc8xx/start.S | > .globl _start | > .extern testLed | > _start: | > lis r3, 0x220 /* my IMMR addr is 0x2200000 */ | > ori r3, r3, 0x0000 | > mtspr 638, r3 /*IMMR SPR is 638*/ | > | > bl testLed /* this is to light LEDs on board(PA0 - PA3)*/ | > ---------------------------------------------------------- | > located in /cpu/mpc8xx/cpu_init.c | > void testLed(void) | > { | > int i,k; | > for(k=0;k<5;k++) | > { | | This cannot work. You added your code much too early, where no stack | has been set up yet. | | My recommendation is not to change cpu/mpc8xx/start.S if you don't | know EXACTLY what you are doing. If you want to insert your own debug | code written in C, then you cannot do this before the comment reading | "let the C-code set up the rest" (but then you can alos include your | code in cpu_init_f(). | | | Also, you should get yourself a BDI2000 so you can debug your system. | | | Best regards, | | Wolfgang Denk | | -- | Software Engineering: Embedded and Realtime Systems, Embedded Linux | Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de | There are bugs and then there are bugs. And then there are bugs. | - Karl Lehenbauer |

In message 001401c31955$37fdf290$904fa93d@john you wrote:
But, I built same codes in rominit.S based on Vxworks, the LED is lighting.(
The rominit.S code of VxWorks is different software, so different rules may apply. I have no idea when and where they set up a stack.
codes is following ) What's problem in u-boot? is it possible to change the IMMR address by me? Next, are there any introduction on the file of u-boot.lds or how
There is no problem in U-Boot. You are just doing things that make no sense.
And no, as long as you don;t understand why IMMR must be mapped at 0xF0000000 or above you are not permitted to change it.
to modify it according to customized board?
Please read the documentation that comes with the GNU Linker.
because it is my personal interest in u-boot, so I have no debuger as BDI on hand and only to debug the U-boot using lighting LEDs on board. Is there lower cost debuger to be ordered ?
For MPC8xx based systems there is the BDM4GDB project at sourceforge; a BDM4GDB parallel port adapter costs just 49.95 Euro.
Next, can anyone help give the used assemble codes to light LED? I'm not familiar with assemble.
Use "gcc -S" to translate your C code and try to nderstand the generated output.
Best regards,
Wolfgang Denk

Hello!
I have some questions to be answered.
When porting MPC8260ADS board, if need to modify the value of CFG_FLASH0_BASE and IMMR, which related files or configurations should be modified at the same time?
Any help and comments are appreciated!
John

In message 000601c31af8$cee26160$0536a93d@john you wrote:
I have some questions to be answered.
When porting MPC8260ADS board, if need to modify the value of CFG_FLASH0_BASE and IMMR, which related files or configurations should be modified at the same time?
Only include/configs/MPC8260ADS.h needs adjustment.
You are right, it uses a broken configuration (i. e. completely useless if you want to run Linux).
Any help and comments are appreciated!
Of you have a version that is running on your board, please send a patch so I can check it in.
Best regards,
Wolfgang Denk
participants (2)
-
John
-
Wolfgang Denk