| Welcome to AT91SAM Community Forum http://www.at91.com/samphpbb/ |
|
| Where the binary program code is stored? SAM7X http://www.at91.com/samphpbb/viewtopic.php?f=15&t=18477 |
Page 1 of 1 |
| Author: | neo444 [ Mon Aug 10, 2009 2:08 pm ] |
| Post subject: | Where the binary program code is stored? SAM7X |
I'm using SAM7X256. This device has, as it's name implies, 256KB of FLASH memory. I need the most of the 256KB to store some data. But I don't know if the binary program code is stored in that space, which may reduce significantly the total free space, or elsewhere. If the binary program code is stored elsewhere, then where is it? How can I know if my program isn't too large to fit in the available space? Thank you. Regards, Dor. |
|
| Author: | mjbcswitzerland [ Mon Aug 10, 2009 11:49 pm ] |
| Post subject: | Re: Where the binary program code is stored? SAM7X |
Hi Dor The SAM7X256 can only run from code in internal FLASH (or limited in internal SRAM). This means that your data needs to share space with the code. You can usually see the code size when you have compiled the project in the IDE that you are using, or by using the GCC "size" to show the size from your ELF file. If you need larger data storage space it is common to use an SPI FLASH chip via one of the SPIs - these are fast, cheap and give much larger data storage possibilities than using internal FLASH (alone). Regards Mark http://www.uTasker.com |
|
| Author: | bdenis [ Sat Aug 15, 2009 12:36 pm ] |
| Post subject: | Re: Where the binary program code is stored? SAM7X |
Hi, The SAM7X exists also in 512 kbytes (SAM7X512). Regards, bdenis |
|
| Author: | neo444 [ Tue Aug 18, 2009 1:54 pm ] |
| Post subject: | Re: Where the binary program code is stored? SAM7X |
Thank you both! I think that when I transfer data from the PC to the uC via JTAG, the program code is stored in the SRAM, because that when I unplug the power cable and then plug it, the uC doesn't run from the beginning (address 0x0 I assume). What should I do in order to make the uC to execute the initial code from the beginning? Even the reset button doesn't help here. I'm using the Evaluation Kit. Thanks and sorry for my newbie questions. Best regards, Dor. |
|
| Author: | mjbcswitzerland [ Tue Aug 18, 2009 5:00 pm ] |
| Post subject: | Re: Where the binary program code is stored? SAM7X |
Hi Dor Projects often have multiple targets (for SRAM and for FLASH). The SRAM is often called "debug" and the FLASH one "release", although debugging in FLASH is also possible. How you work with the two depends on the debugger environment that you use. Often the ATMEL SAMBA program is used to program to FLASH, whereby a non-volatile FLASH bit also needs to be set so that it boots from the application rather than the internal boot loader. Therefore you may also find that your code is running from FLASH when the debugger is starting it, but after a manual reset the internal boot loader starts instead because the NV bit has not be set. See chapter 5 of the following for some more details: http://www.utasker.com/docs/SAM7X/uTaskerV1-4_SAM7X.PDF Since the SRAM space is much more limited compared to the FLASH it is a good idea to be become proficient with debugging in FLASH as this is often the only way to debug complete project code. Regards Mark http://www.uTasker.com |
|
| Author: | neo444 [ Tue Aug 18, 2009 9:07 pm ] |
| Post subject: | Re: Where the binary program code is stored? SAM7X |
Hi mjbcswitzerland, Thanks for that quick tutorial! I'll try that in the future when I'll be need to download the program code to FLASH. I'm using EDGE ( http://www.mentor.com/products/embedded ... dev-suite/ ) as my IDE. Is it capable of downloading the program code to FLASH? Instead of SRAM like it did always. Best regards, Dor. |
|
| Author: | mjbcswitzerland [ Tue Aug 18, 2009 9:41 pm ] |
| Post subject: | Re: Where the binary program code is stored? SAM7X |
Hi Dor I never used the Mentor IDE (on the SAM7X I work with GCC, IAR4, IAR5, uVision and Rowley Crossworks). However it will almost certainly allow loading to FLASH (I believe it is a rather high end solution so you must be working for a big company). I would ask Mentor Graphics support directly in order to save time. Regards Mark PS Do you use the EDGE SimTest? Can it simulate a SAM7X in a system? (Compare the uTasker SAM7X simulator as described in the previous linked document). |
|
| Author: | neo444 [ Sat Aug 22, 2009 3:54 pm ] |
| Post subject: | Re: Where the binary program code is stored? SAM7X |
OK, I'll try that. Quote: PS Do you use the EDGE SimTest? I don't have it. Thank you! Regards, Dor. |
|
| Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|



Forum