We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I use Keil uVision4 to build my project.
Here is my test C code:
void func(void)
{
//do something
printf("I hope to be recognized as RO-DATA!\n");
}
But assembler code is below. As u see, the string was put into RO-CODE section as inline data!
I realllllllllllllly want to know How to place a "short string" into [RO-DATA] section, but not in [RO-CODE(inc. data)] section?
Thanks!
------------------------------------------------------------------------------------------------------------------
func
0x00002c44: b510 .. PUSH {r4,lr}
0x00002c46: a013 .. ADR r0,{pc}+0x4e ; 0x2c94
0x00002c48: f000fc9a .... BL printf ; 0x3580
;; some other codes for RO-CODE section
$d
;; the string is here !
0x00002c94: 6f682049 I ** DCD 1869094985
0x00002c98: 74206570 pe t DCD 1948280176
0x00002c9c: 6562206f o be DCD 1700929647
0x00002ca0: 63657220 rec DCD 1667592736
0x00002ca4: 696e676f ogni DCD 1768843119
0x00002ca8: 2064657a zed DCD 543450490
0x00002cac: 52207361 as R DCD 1377858401
0x00002cb0: 41442d4f O-DA DCD 1094987087
0x00002cb4: 0a214154 TA!. DCD 169951572
0x00002cb8: 00000000 .... DCD 0