Skip to contentSkip to conversation

Unexpected crash in init_baudrate

U-Boot-Users Jeff Stevens 2 participants 4 messages Jan 7, 2004 – Jan 8, 2004

lore
Share & tools
lore
#0 lore raw

I am porting U-Boot over to a new product running an MPC855T processor, 512KB of flash, 16MB of SDRAM, and a 32KB Simtek NVRAM. I have the board booting up to the point where it tries to read the baudrate for the RS-232 port (init_baudrate). When it goes into the getenv_r function from within init_baudrate, it seems to eventually crash before it comes back with an answer. The system seems to read from the NVRAM fine when it boots and runs crc32 on it. It also crashes if I change CFG_ENV_SIZE to 0x4 and force it to read the default values (env_get_char_init). Does anyone have any ideas as to what can be causing this? I'm going to keep poking around myself, but I just wanted to see if anyone else has had a problem like this while porting U-Boot.

Thanks in advance,
Jeff Stevens

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

#1 lore raw
Quoted 4 lines · In message <[email protected]> you wrote:

I am porting U-Boot over to a new product running an MPC855T processor, 512KB of flash, 16MB of SDRAM, and a 32KB Simtek NVRAM. I have the board booting up to the point where it tries to read the baudrate for the

Remember that at this time there is just the (small) stack: no writable data segment, no standard C global data.

Quoted 6 lines

RS-232 port (init_baudrate). When it goes into the getenv_r function from within init_baudrate, it seems to eventually crash before it comes back with an answer. The system seems to read from the NVRAM fine when it boots and runs crc32 on it. It also crashes if I change CFG_ENV_SIZE to 0x4 and force it to read

Ummm... an environment size of 0x4 = 4 Bytes??? Are you sure??

Quoted 5 lines

the default values (env_get_char_init). Does anyone have any ideas as to what can be causing this? I'm going to keep poking around myself, but I just wanted to see if anyone else has had a problem like this while porting U-Boot.

For a start, put the environment in flash. (It's probably more reliable anyway as you can configure for redundand storage).

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Worlds may change, galaxies disintegrate, but a woman always  remains
a woman.
	-- Kirk, "The Conscience of the King", stardate 2818.9
#2 lore raw

My real CFG_ENV_SIZE is 0x3000, however, I made it 0x4 to force it to go pretty much straight to the default configurations to see if that would work, but it didn't. Doesn't U-Boot first go to where you have configured it to use for env (in my case NVRAM) and then if it can't find what it's looking for there it goes to the defaults?

I'm just trying to get this to boot for the first time. After that, I'll worry about getting the env where I want it. I just don't understand why it's crashing. I haven't altered to code in any way here, so I assume I'm configuring something wrong, but I'm not sure what? What configuration parameters should I look at in my board_config.h file?

I'll try putting the env in flash for starters, but eventually I need to put it in NVRAM. The flash I'm working with now will eventually be a backup flash, and there is a bigger flash that will normally be the boot flash. So I'd like to have the env separate in case the user messes up the normal boot flash, they can still boot normally. Thanks for the reply!

Regards,
Jeff Stevens

Quoted 40 lines · --- Wolfgang Denk

In message <[email protected]>

Quoted 1 line · you

I am porting U-Boot over to a new product running

an

Quoted 1 line

MPC855T processor, 512KB of flash, 16MB of SDRAM,

and

Quoted 1 line

a 32KB Simtek NVRAM. I have the board booting up

to

Quoted 1 line

the point where it tries to read the baudrate for

the

Remember that at this time there is just the
(small) stack: no
writable data segment, no standard C global data.

Quoted 1 line

RS-232 port (init_baudrate). When it goes into

the

Quoted 1 line

getenv_r function from within init_baudrate, it

seems

Quoted 2 lines

to eventually crash before it comes back with an
answer. The system seems to read from the NVRAM

fine

Quoted 1 line

when it boots and runs crc32 on it. It also

crashes

Quoted 1 line

if I change CFG_ENV_SIZE to 0x4 and force it to

read

Ummm... an environment size of 0x4 = 4 Bytes??? Are you sure??

Quoted 1 line

the default values (env_get_char_init). Does

anyone

Quoted 1 line

have any ideas as to what can be causing this?

I'm

Quoted 1 line

going to keep poking around myself, but I just

wanted

Quoted 2 lines

to see if anyone else has had a problem like this
while porting U-Boot.

Quoted 22 lines

For a start, put the environment in flash. (It's probably more
reliable anyway as you can configure for redundand storage).

Best regards,

Wolfgang Denk

Signature · 9 lines
Software Engineering:  Embedded and Realtime
Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88 
Email: wd at denx.de
Worlds may change, galaxies disintegrate, but a
woman always  remains
a woman.
	-- Kirk, "The Conscience of the King", stardate
2818.9

-------------------------------------------------------

Quoted 12 lines

This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval!
http://www.perforce.com/perforce/loadprog.html
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/u-boot-users

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

#3 lore raw
Quoted 7 lines · In message <[email protected]> you wrote:

My real CFG_ENV_SIZE is 0x3000, however, I made it 0x4 to force it to go pretty much straight to the default configurations to see if that would work, but it didn't. Doesn't U-Boot first go to where you have configured it to use for env (in my case NVRAM) and then if it can't find what it's looking for there it goes to the defaults?

If the NVRAM accesses fail it does not matter if they are failing when trying to read 4 bytes or 12 k bytes.

Quoted 2 lines

not sure what? What configuration parameters should I look at in my board_config.h file?

Everything that might be imprtant for NVRAM access.

Best regards,

Wolfgang Denk

Signature · 4 lines
See us @ Embedded World, Nuremberg, Feb 17 - 19,  Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Documentation is the castor oil of programming.
Managers know it must be good because the programmers hate it so much.