mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[bootloader] Compatibility with Omega 2.0
This commit is contained in:
42
bootloader/trampoline.cpp
Normal file
42
bootloader/trampoline.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <ion/src/device/shared/drivers/external_flash.h>
|
||||
#include <ion/src/device/n0110/drivers/power.h>
|
||||
|
||||
#include <bootloader/trampoline.h>
|
||||
#include <bootloader/boot.h>
|
||||
|
||||
namespace Bootloader {
|
||||
|
||||
void __attribute__((noinline)) suspend() {
|
||||
Ion::Device::Power::internalFlashSuspend(true);
|
||||
}
|
||||
|
||||
void* Trampolines[TRAMPOLINES_COUNT]
|
||||
__attribute__((section(".trampolines_table")))
|
||||
__attribute__((used))
|
||||
= {
|
||||
(void*) Bootloader::suspend, // Suspend
|
||||
(void*) Ion::Device::ExternalFlash::EraseSector, // External erase
|
||||
(void*) Ion::Device::ExternalFlash::WriteMemory, // External write
|
||||
(void*) memcmp,
|
||||
(void*) memcpy,
|
||||
(void*) memmove,
|
||||
(void*) memset,
|
||||
(void*) strchr,
|
||||
(void*) strcmp,
|
||||
(void*) strlcat,
|
||||
(void*) strlcpy,
|
||||
(void*) strlen,
|
||||
(void*) strncmp
|
||||
};
|
||||
|
||||
void* CustomTrampolines[CUSTOM_TRAMPOLINES_COUNT]
|
||||
__attribute__((section(".custom_trampolines_table")))
|
||||
__attribute__((used))
|
||||
= {
|
||||
(void*) Bootloader::Boot::mode,
|
||||
(void*) Bootloader::Boot::setMode
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user