mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-26 01:48:10 -07:00
Code Cleanup: unused includes, useless checks, unused variables, etc... (#3696)
* Remove unnecessary checks * Sublime: never insert missing headers * Cleanup furi defines use * Cleanup startup. Cleanup linker scripts. Explicitly define all interrupts hadlers, including uninmplemented one. * Startup routine in C * Drop assembler startup * Move linker defines to stm32wb55_linker.h, cleanup naming, unify usage. Mpu: protect last 32b of main stack. Document various obscure things. * Move furi_hal_switch documentation to appropriate place, use 0x0 for updater jump. * UnitTests: move all temporary test files into tmp folder --------- Co-authored-by: SG <who.just.the.doctor@gmail.com>
This commit is contained in:
@@ -55,9 +55,15 @@ void furi_hal_deinit_early(void);
|
||||
/** Init FuriHal */
|
||||
void furi_hal_init(void);
|
||||
|
||||
/** Transfer execution to address
|
||||
/** Jump to the void*
|
||||
*
|
||||
* @param[in] address pointer to new executable
|
||||
* Allow your code to transfer control to another firmware.
|
||||
*
|
||||
* @warning This code doesn't reset system before jump. Call it only from
|
||||
* main thread, no kernel should be running. Ensure that no
|
||||
* peripheral blocks active and no interrupts are pending.
|
||||
*
|
||||
* @param address The System Vector address(start of your new firmware)
|
||||
*/
|
||||
void furi_hal_switch(void* address);
|
||||
|
||||
|
||||
@@ -14,8 +14,9 @@ extern "C" {
|
||||
|
||||
typedef enum {
|
||||
FuriHalMpuRegionNULL = 0x00, // region 0 used to protect null pointer dereference
|
||||
FuriHalMpuRegionStack = 0x01, // region 1 used to protect stack
|
||||
FuriHalMpuRegion2 = 0x02,
|
||||
FuriHalMpuRegionMainStack = 0x01, // region 1 used to protect Main Stack
|
||||
FuriHalMpuRegionThreadStack =
|
||||
0x02, // region 2 used to protect currently executed RTOS Thread Stack
|
||||
FuriHalMpuRegion3 = 0x03,
|
||||
FuriHalMpuRegion4 = 0x04,
|
||||
FuriHalMpuRegion5 = 0x05,
|
||||
|
||||
Reference in New Issue
Block a user