我正在使用Atmel studio 7.0。
当我尝试使用freeRTOS的代码时,我来到这个函数。
/*
* Low-level initialization routine called during startup, before the main
* function.
* This version comes in replacement to the default one provided by the Newlib
* add-ons library.
* Newlib add-ons' _init_startup only calls init_exceptions, but Newlib add-ons'
* exception vectors are not compatible with the SCALL management in the current
* FreeRTOS port. More low-level initializations are besides added here.
*/
int _init_startup(void);
int _init_startup(void)
{
/* Import the Exception Vector Base Address. */
extern void _evba;
#if configHEAP_INIT
extern void __heap_start__;
extern void __heap_end__;
portBASE_TYPE *pxMem;
#endif
...
正如您在评论中看到的那样,此函数在main之前被调用,但是我没有调用此函数的函数。
经过一些研究,我说可以在链接器脚本中调用此函数,但事实并非如此,链接器脚本如下所示:
/* Default linker script, for normal executables */
OUTPUT_FORMAT("elf32-avr32", "elf32-avr32",
"elf32-avr32")
OUTPUT_ARCH(avr32:uc)
ENTRY(_start)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
我希望在这个文件中找到对_init_startup的调用,但事实并非如此。
总结这里是我的问题:
1-我在哪里可以找到_init_startup
2-为什么在链接描述文件中我有ENTRY(_start)
而不是ENTRY(main)
3-我在哪里可以找到_start
非常感谢。
答案 0 :(得分:0)
Didnt与Atmel mcu合作,但我认为它和另一个一样。
1-在哪里可以找到对_init_startup的调用?
2-为什么在链接器脚本中我有ENTRY(_start)而不是ENTRY(main)?
3-我在哪里可以找到_start的定义?