Browse Source

HAL_ChibiOS: disable thread_info in AP_Periph and bootloader

zr-v5.1
Andrew Tridgell 5 years ago
parent
commit
6bacf021c8
  1. 5
      libraries/AP_HAL_ChibiOS/Util.cpp
  2. 2
      libraries/AP_HAL_ChibiOS/Util.h
  3. 6
      libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

5
libraries/AP_HAL_ChibiOS/Util.cpp

@ -304,7 +304,7 @@ bool Util::was_watchdog_reset() const @@ -304,7 +304,7 @@ bool Util::was_watchdog_reset() const
return stm32_was_watchdog_reset();
}
#if CH_DBG_ENABLE_STACK_CHECK == TRUE && !defined(HAL_BOOTLOADER_BUILD)
#if CH_DBG_ENABLE_STACK_CHECK == TRUE
/*
display stack usage as text buffer for @SYS/threads.txt
*/
@ -343,4 +343,5 @@ size_t Util::thread_info(char *buf, size_t bufsize) @@ -343,4 +343,5 @@ size_t Util::thread_info(char *buf, size_t bufsize)
return total;
}
#endif
#endif // CH_DBG_ENABLE_STACK_CHECK == TRUE

2
libraries/AP_HAL_ChibiOS/Util.h

@ -65,8 +65,10 @@ public: @@ -65,8 +65,10 @@ public:
// return true if the reason for the reboot was a watchdog reset
bool was_watchdog_reset() const override;
#if CH_DBG_ENABLE_STACK_CHECK == TRUE
// request information on running threads
size_t thread_info(char *buf, size_t bufsize) override;
#endif
private:
#ifdef HAL_PWM_ALARM

6
libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

@ -773,10 +773,16 @@ def write_mcu_config(f): @@ -773,10 +773,16 @@ def write_mcu_config(f):
#define CH_CFG_USE_MEMCORE FALSE
#define HAL_USE_I2C FALSE
#define HAL_USE_PWM FALSE
#define CH_DBG_ENABLE_STACK_CHECK FALSE
''')
if env_vars.get('ROMFS_UNCOMPRESSED', False):
f.write('#define HAL_ROMFS_UNCOMPRESSED\n')
if 'AP_PERIPH' in env_vars:
f.write('''
#define CH_DBG_ENABLE_STACK_CHECK FALSE
''')
def write_ldscript(fname):
'''write ldscript.ld for this board'''

Loading…
Cancel
Save