Hello,
I ran into an unpleasant moment due to which the build of my project stopped.The project was created for the STM32 microcontroller to study the use of C ++ for embedded systems.
The corresponding packages are installed:
stm32l4;
CMSIS 5 (Core and DSP)
SES Version: 5.40c
To get access to some assembly functions (for example __NOP(), __SEV(), __WFI(), ... ) I include the file "cmsis_gcc.h" and I get the following errors:
Building ‘stm32L4’ from solution ‘stm32L4’ in configuration ‘Debug’
Compiling ‘main.cpp’
main.cpp
'const __cmsis_start()::__copy_table_t __copy_table_start__', declared using local type 'const __cmsis_start()::__copy_table_t', is used but never defined [-fpermissive]
'const __cmsis_start()::__copy_table_t __copy_table_end__', declared using local type 'const __cmsis_start()::__copy_table_t', is used but never defined [-fpermissive]
'const __cmsis_start()::__zero_table_t __zero_table_start__', declared using local type 'const __cmsis_start()::__zero_table_t', is used but never defined [-fpermissive]
'const __cmsis_start()::__zero_table_t __zero_table_end__', declared using local type 'const __cmsis_start()::__zero_table_t', is used but never defined [-fpermissive]
Build failed
The search for a way to fix this error led to the forum: Github: ARM CMSIS. But the solution suggested there has to do with modifying the file "cmsis_gcc.h":
// After "bugFix"
typedef struct {
uint32_t const* src;
uint32_t* dest;
uint32_t wlen;
} __copy_table_t;
typedef struct {
uint32_t* dest;
uint32_t wlen;
} __zero_table_t;
extern const __copy_table_t __copy_table_start__;
extern const __copy_table_t __copy_table_end__;
extern const __zero_table_t __zero_table_start__;
extern const __zero_table_t __zero_table_end__;
__STATIC_FORCEINLINE __NO_RETURN void __cmsis_start(void)
{
extern void _start(void) __NO_RETURN;
for (__copy_table_t const* pTable = &__copy_table_start__; pTable < &__copy_table_end__; ++pTable) {
for(uint32_t i=0u; i<pTable->wlen; ++i) {
pTable->dest[i] = pTable->src[i];
}
}
for (__zero_table_t const* pTable = &__zero_table_start__; pTable < &__zero_table_end__; ++pTable) {
for(uint32_t i=0u; i<pTable->wlen; ++i) {
pTable->dest[i] = 0u;
}
}
_start();
}
Display More
I believe that it is bad form to modify the file you supplied in the package.
I have attached a project that reproduces the given problem: stm32.zip.
Please, tell me how to deal with this error?
____________________________________________
With best regards,
Max