I'm new of arm processor and I'd like to import a variable in a .s file the variable is definited in a c file:
#define INIT_VAR 1
extern uint32_t save_mem = INIT_VAR;
or better I need to write inside a memory address of that variable.
PS: I'm working witrh ARM cOrtex M0+ processor.
Also, It is possible to write with ldr instruction in a specified address a integer value?
Hi vdavi81 I have moved this to Cortex-M forum, as Community Help is specifically for help on how to use the Community/issues with accounts.
It is possible.
The exact syntax of importing a global symbol depends on the tool chain you are using.
For example, in Arm assembly you can use IMPORT to access a global variable in C code.
View all questions in Cortex-M / M-Profile forum