Господа, не могу понять код. Вроде "pure C", но может компилятор от
какой-то версии нужен или ключи передать? // file: standalone.c
//.... из шапки:
/*
* This code defines a run-time environment for the C library.
* Without this, the C startup code will attempt to use semi-hosting
* calls to get environment information.
*/
// На что ругается.
/// @cond HIDDEN_SYMBOLS
#pragma import(__use_two_region_memory)
__value_in_regs struct R0_R3 {
unsigned heap_base, stack_base, heap_limit, stack_limit;
}
__user_initial_stackheap(unsigned int R0, unsigned int SP, unsigned int R2, unsigned int SL)
{
struct R0_R3 config;
config.heap_base = (unsigned int)&Image$$RW_RAM1$$ZI$$Limit;
config.stack_base = SP;
config.heap_limit = SP - 0x10000;
return config;
}
/// @endcond HIDDEN_SYMBOLS
standalone.c:37:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'struct' __value_in_regs struct R0_R3 { ^~~~~~
Это из комплекта Nuvoton NonOS_BSP