GDB error with invalid offset, value too large (0x00000400) Unable to create application in debug mode.

I have an application that worked fine a few days ago. But today I get this error:

{standard input}: 1948: invalid offset, value too large (0x00000400) Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 exit failure> code 1

+3
source share
3 answers

Ok guys, Finally, I found a solution. The problem was in the big case. Converting this to an if else expression solved the problem.

+3
source

, . (26 ), , - . if-else GCC.

0

, ARM Cortex-M0. , , :

ldr r7 ,=PRTCNFG_10

-, PRTCNFG_10 ( .equ) r7. -

ldr r7 ,[pc, #immed8]

# instant8 - 8- . 2 ^ 8 = 256, PRTCNFG_10 pc + 256 , .

, PRTCNFG_10 :

PRTCNFG_10:
.word 0x606
0

Source: https://habr.com/ru/post/1766142/


All Articles