- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I want to know how I can change the address where the program will be copied into the RAM. Right now everytime I build the app the srec2flash utility reports that the app spans from 0x1000000 to 0x1007628. How can I change this so the app is put somewhere else in the RAM??? Regards GreateWhite.DKLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
There are hooks in the srec2flash utility that should allow you to do this. Here's an output that I get by running 'srec2flash' with no arguments:$ srec2flash
flash address: 0x00140000
ram address: 0x00000000
max copy size: 0x00000000
srec2flash <filename>.srec
--flash_address=x Where in flash to store the copier & program,
(defaults to 0x140000)
--ram_address=x Where in RAM to copy the program to, and execute
(defaults to 0x40000)
--copy_size=x How many bytes to copy from flash to RAM
(defaults to 0x40000)
--sdk_directory=<dir> Specify an sdk directory
"srec2flash"
The Nios development board's Germs monitor looks
for code in flash memory. The srec2flash utility
takes code targeted for program memory and
prepends a copying routine to copy itself from
flash memory to program memory. It also prepends
the necessary Germs monitor commands to write
the file into flash.
The output, <filename>.flash, can be burnt to
flash by using nios-run:
nios-run -x <filename>.flash
(Only works over serial; nios-run over jtag
does not support this feature.)
In other words, this command does return the default values, when run with no arguments, but by using the --ram-address=<your_new_location> option, you should see the behavior that you want. Hope this helps. Cheers, - Brendan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If its a simple program just use -b build option to set the base address? I use it all the time to relocate srec files:
nb -b 0x1000600 my_prog.c This gives germs that starts at 0x1000000 enough room so that I can load and reload new builds over the serial port without rebooting my board. Ken- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did this solve the problem?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page