I have a function that is causing the SP to go to non-ram.
Below is the prolog, which looks very odd, r7 is the offset due to variables, that is fine, but then it is overwritten with sp+8, THEN it is added to the SP, this causes SP to go from 0x2002xxxx to 0x4004xxxx, quite a large jump.
fmonty():
20005e14: 4F70 LDR R7, $C$CON1
20005e16: B580 PUSH {R7, LR}
20005e18: AF02 ADD R7, SP, #8
20005e1a: 44BD ADD R13, R7
20005e1c: 9303 STR R3, [SP, #12]
20005e1e: 9202 STR R2, [SP, #8]
Commandline target is cc3200:
"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k crypt/curve25519/curve25519_donna.obj
'Building file: ../crypt/curve25519/curve25519_donna.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.2/bin/armcl" -mv7M4 --code_state=16 --float_support=vfplib --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.2/include" --include_path="C:/Users/IEUser/workspace_v6_1/power_test/ti/simplelink" --include_path="C:/Users/IEUser/workspace_v6_1/power_test/ti" --include_path="C:/Users/IEUser/workspace_v6_1/power_test/ti/common" --include_path="C:/Users/IEUser/workspace_v6_1/power_test/crypt" --include_path="C:/Users/IEUser/workspace_v6_1/power_test/crypt/chacha20" --include_path="C:/Users/IEUser/workspace_v6_1/power_test/crypt/poly1305" --include_path="C:/Users/IEUser/workspace_v6_1/power_test/sdk" --include_path="C:/Users/IEUser/workspace_v6_1/power_test/ti/inc" --include_path="C:/Users/IEUser/workspace_v6_1/power_test/ti/driverlib" --include_path="C:/Users/IEUser/workspace_v6_1/power_test/ti/simplelink/include" -g --c99 --relaxed_ansi --define=cc3200 --define=ccs --define=NOTERM --define=NDEBUG --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="crypt/curve25519/curve25519_donna.pp" --obj_directory="crypt/curve25519" "../crypt/curve25519/curve25519_donna.c"