I can use the following #pragma in my code to put variables into my own data section: #pragma arm section rwdata = "__my_data_block__"
Is it possible to do this as a compiler option so that I can have a whole group of files compiled thusly?
The reason I want to do this is so that I can compile a whole group of 'off the shelf' library files without having to edit them to add the #pragma.
Thanks for any help.
Couldn't you do it in the Scatter file?
See link at the foot of www.keil.com/.../armcc_chr1359124985290.htm
I don't see how. I want to specify that a particular group of files have there variables mapped to a particular data block. I don't want to edit these files since they are provided as 'off the shelf'.
You can list specific object files when adding rules to the scatter file. This is quite common needed when having processors with multiple RAM or ROM areas, to force specific information to a specific region.
Compiling a source file with specific named sections is normally done when you want only a part of the data or code from a source file to end up at a specific location.
Thanks! That did the trick.
So in the scatter file I add something like:
__bluetooth_library_block__ +0 ALIGN 0x80 { ble_event.o (.data, .bss) ble_gap_address_get.o (.data, .bss) ble_gap_address_set.o (.data, .bss) ble_gap_adv_data_set.o (.data, .bss) ble_gap_adv_start.o (.data, .bss) ble_gap_adv_stop.o (.data, .bss) ble_gap_app.o (.data, .bss) ble_gap_appearance_get.o (.data, .bss) ble_gap_appearance_set.o (.data, .bss) ble_gap_auth_key_reply.o (.data, .bss) ble_gap_authenticate.o (.data, .bss) }
... and this places all ram data from these modules into the same block named __Bluetooth_library_block__.
Now I can setup the MPU to allow task 'X' access to this block.
Thanks again!