SingingCat 0
application
startup.c
1#include <main-header.h>
2#include <loader-api.h>
3#include <constants.h>
4#include <function-instr.h>
5extern void *loaderapiptr;
6extern void *app_pfnVectors;
12int stm32startup(uint32_t loaderapi) {
13 loaderapiptr = (void *)loaderapi;
14
15 /* new location of the vector table */
16 uint32_t adr = (uint32_t)&app_pfnVectors;
17
18 *((uint32_t volatile *)0xE000ED08) = adr;
19 // enable additional exceptions in SCB_SHCSR
20 uint32_t ex = *((uint32_t volatile *)0xE0000024);
21
22 *((uint32_t volatile *)0xE0000024) = ex | (1 << 18) | (1 << 17) | (1 << 16);
23 /*
24 * get_reboot_info()->function = loader_get_last_function_ptr();
25 * enable_pc_tracing();
26 */
27 app_main();
28 return 0;
29}
30
31void noop() {
32}
33
34void WindowWatchdog_IRQHandler() {
35 printf("Watchdog???\r\n");
36}
int app_main(void)
Definition: main.c:839