2024-04-02 11:43 AM
#define EEPROM_SEC __attribute__((long_call, section("EepromSection")))
EEPROM_SEC
int add(int a, int b) {
return a + b;
}
static __attribute__(( aligned(32))) uint32_t code_buf[20] = { 0 };
//...
int main(void) {
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_I2C1_Init();
EEPROM_Init();
printf(add);//If I do not do this despite all my efforts, the compiler ignores the add function
EEPROM_Read(code_buf, 64, 0);
int (*my_summer)(int, int);
my_summer = ((uint32_t *)(code_buf));
my_summer(100, 20);
while (1) {
}
}
error causing code(asm) : push {r7}
What do you think I'm doing wrong?
Solved! Go to Solution.
2024-04-02 12:47 PM
>>What do you think I'm doing wrong?
There are a lot of moving parts here, and you're quite a way from getting everything correct.
2024-04-02 12:47 PM
>>What do you think I'm doing wrong?
There are a lot of moving parts here, and you're quite a way from getting everything correct.
2024-04-02 01:50 PM
Thanks