LF: 5282 Load from Flash GNU Example

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LF: 5282 Load from Flash GNU Example

2,386 Views
James75
Contributor I
Hi there,

I'm looking for an example of some code that will load any little demo program from external flash and run it. I haven't had any luck getting u-boot to run directly on the M5282EVB board, the conflicting comments saying it both does and doesn't require a boot loader within the same file aren't that helpful either.

I can't seem to be able to find colilo anywhere either, has that just dropped off the face of the earth?

My goal is to be able to boot, grab dhcp address, download uClinux image from the network (or boot from flash version if it is unavailable) and boot uClinux.

I have the m68k-elf-gcc toolchain all setup and working - I can compile u-boot and build uclinux with no issues, and they both run out of SDRAM. It's just the initial part of the boot that is causing me a headache!

Thanks for any info,

James
Labels (1)
0 Kudos
Reply
4 Replies

870 Views
James75
Contributor I
Hi aLUNZ, thanks for the reply!

Regarding dBUG, the source tree that I downloaded from freescale had some issues with the flash.lcf file being kind of out of whack, so I had no way to compile + link it so that it would boot from flash. However just getting in this morning I see that the Freescale support crew has sent me out a zip file with fixed files, so I will give that a go. If this does work this will solve most of my issues, thankfully!

Porting it to GNU will probably be a bit of a hassle, although I did notice that Codewarrior does have a "generate GNU makefile" option so I'll give that a go.

I'd love to just get the codewarrior coldfire tools personally (using 30 day eval right now) but trying to sell bosses on $3-5k software packages when the free tools are widely available is tough!
0 Kudos
Reply

870 Views
James75
Contributor I
Okay, I've managed to get dBug compiling on my linux m68k-elf-gcc tools with the following switches (in case anyone else might need them) :

m68k-elf-gcc -m528x -O -Xlint -I. -I./proj/m5282evb/src -g -Wa,--register-prefix-optional -c <file> -o <object>

The -Wa,--register-prefix-optional being probably the most important, the asm gets all sorts of parse errors otherwise.

Anyway I'm now looking for a good example linker file while I try to convert over from the mwerks/diab linkers.

Hints or tips would be *most* appreciated!
0 Kudos
Reply

870 Views
aLUNZ
Contributor I
"I don't have a solution but I certainly admire the problem."

I don't know how much help it is, but the dBUG for the M5329EVB is built with the GNU tools.  If you weren't aware of that it might be a worthwhile exercise to download that and use it as a basis for your conversion work? 

Interestingly enough there are two source downloads for version 4c of dBUG.  The larger one:
http://www.freescale.com/webapp/sps/download/license.jsp?colCode=M5329EVB_DBUG&location=null&fpsp=1
consists of a directory build tree and makefiles to support several target / tool chain combinations and might be a good place to compare projects side by side?

Good luck,
aLUNZ
0 Kudos
Reply

870 Views
aLUNZ
Contributor I
James,

At great risk of advertising my ignorance here, but is there any reason why dBUG won't work for you?  For our M5329 development we use dBUG to automatically download and run the uClinux image on boot.  dBUG could also be configured to copy an image from flash into RAM and run that if we wanted.  The only (v. minor) limitation with dBUG for this purpose is that it does not include a DHCP client.

Not knowing of any special constraints of the M5282evb I would have thought that dBUG should do most of what you want to do?  And if it doesn't do everything you want, at least you have the source code so you can make any minor changes (although converting the project from Diab to GNU tools would be a non-trivial exercise).

aLUNZ
0 Kudos
Reply