123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- #include "jump_function.h"
- #include "global_config.h"
- #include "OSAL_Tasks.h"
- #include "rf_phy_driver.h"
- #include "pwrmgr.h"
- #include "adc.h"
- #include "gpio.h"
- #include "uart.h"
- #include "i2c_s.h"
- #include "kscan.h"
- #include "rflib.h"
- #include "log.h"
- #include "spi.h"
- #include "watchdog.h"
- #include "ap_timer.h"
- static void hard_fault(void)
- {
- unsigned int cur_sp = __current_sp();
- AT_LOG("Hard Fault SP is %x\n",cur_sp);
- for(int i = 0; i< 0x10; i++){
- AT_LOG("0x%x,", ((uint32_t*)cur_sp)[i]);
- }
- while(1){
- ;
- }
- }
- void PendSV_Handler( void ) __attribute__((weak));
- void SysTick_Handler( void ) __attribute__((weak));
- const uint32_t* const jump_table_base[256] __attribute__((section("jump_table_mem_area"))) =
- {
- (const uint32_t*)0,
- (const uint32_t*)osalInitTasks,
- (const uint32_t*)tasksArr,
- (const uint32_t*)&tasksCnt,
- (const uint32_t*)&tasksEvents,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,
- 0,
- 0,
- 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- (const uint32_t*)hal_pwrmgr_sleep_process,
- (const uint32_t*)hal_pwrmgr_wakeup_process,
- (const uint32_t*)rf_phy_ini,
- 0,
- 0,
- 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- (const uint32_t*)hard_fault, 0, (const uint32_t *)PendSV_Handler, (const uint32_t *)SysTick_Handler, 0, 0, 0, 0,
- 0,
- (const uint32_t*)hal_KSCAN_IRQHandler,
- 0, 0, 0, (const uint32_t*)AP_TIMER_IRQHandler, 0,
- (const uint32_t*)hal_UART0_IRQHandler,
- (const uint32_t*)hal_I2C0_IRQHandler,
- (const uint32_t*)hal_I2C1_IRQHandler,
- (const uint32_t*)hal_SPI0_IRQHandler,
- (const uint32_t*)hal_SPI1_IRQHandler,
- (const uint32_t*)hal_GPIO_IRQHandler,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, (const uint32_t*)hal_ADC_IRQHandler, 0, 0
- };
- uint32 global_config[SOFT_PARAMETER_NUM] __attribute__((section("global_config_area")));
|