Hello, I'm trying to figure out how to do something and I'm getting no where. Hope someone here can point me to some info on this... I have a program that uses three different short int 16 x 16 tables. My code is very stable and I don't need to change it much any more. What I'd like to find out is if there is a way to use Philip's flash tool to just program the tables and not the program. The tables change daily and I'm the only guy who has a seat of the Keil ARM tools. It's a real pain for the guys who are doing the testing to have to email me a new table set, me compile it, the send them back a hex file for them to flash the uC. Does anyone have any tips or sample code on how to do this (if it is possible)? I'm a hardware engineer, so make it simple :)
You can use the _at_ attribute to locate any variable at a fixed address. This includes also arrays. Example: const int myval _at_ 0x20000 = 0x1234; I suggest to contact your local Keil support for further questions.
"const int myval _at_ 0x20000 = 0x1234;" So, when is C51 going to allow "_at_" to be used with initialisers then Reinhard? Seems like you're neglecting your old customers who've been paying their subscriptions for years when you give it to these ARM upstarts!
> You can use the _at_ attribute to locate > any variable at a fixed address. This > includes also arrays. > > Example: > const int myval _at_ 0x20000 = 0x1234; > I suggest to contact your local Keil > support for further questions. THAT's what I've been looking for!!! Thanks Reinhard! I may not have been clear, but I've known that I needed to fix the tables in flash at a certain location but I was not sure as to how to do it. Is the linker smart enough not to use the memory locations I set using the _at_ attribute's ? I've tried several times to read the linker script documentation to figure out how to do it there but after several minutes of reading I go into seizures and loose all muscle control. It isn't pretty. Thanks for the tip!
Is the linker smart enough not to use the memory locations I set using the _at_ attribute's? Yes. That is, if you locate variables using _at_ the segment that is created is an absolute segment located at the specified address. The linker understands this and does not locate other segments in the same memory. Jon
Stefan, we have tried to add _at_ with initialization to C51. It requires that we re-write major parts of the Compiler front-end (more than 6 months of work). We have it done now in CARM, since this is a complete new compile engine with a lot of innovation. The feature will also come in C51, but do not expect it soon (there are acceptable procedures in the Support KB). We are working here about 12-14 hours per day (and sometimes even on the weekend) to get the tools done. They are really complex and even the latest C51 toolset has many improvements (maybe not so much in the compiler, but in the debugger + IDE side). Sorry, I know this answer is not optimal for you. Reinhard
"We are working here about 12-14 hours per day (and sometimes even on the weekend) to get the tools done." I'm sorry, now I feel guilty for asking. Please take a holiday.
Can the _at_ attribute be used with GNU or only with the Keil ARM tools? I tried it with a GNU project and I got a: error: parse error before "_at_" If I can't use the '_at_' with GNU how hard is it to convert a project to use the Keil ARM tools? My code has been running so well that I've never wanted to mess with the new Keil ARM compiler because I was afraid that it would take too much time to get it running. Again, thanks for al of the help!!!
There are several programs that are configured for GNU GCC and Keil CARM. The changes are listed in: http://www.keil.com/support/docs/2968.htm
> There are several programs that are > configured for GNU GCC and Keil CARM. > The changes are listed in: > http://www.keil.com/support/docs/2968.htm Thanks again Reinhard! I swear I searched Keil's site for a doc like this and found nothing... Just took me 15 minutes and I was up an compiling with CARM.