DM: fix upload bug
This commit is contained in:
parent
201a32d2d1
commit
498e819a51
3 changed files with 10 additions and 2 deletions
Binary file not shown.
|
|
@ -193,10 +193,12 @@
|
|||
</ToolchainSettings>
|
||||
<UsesExternalMakeFile>True</UsesExternalMakeFile>
|
||||
<OutputDirectory />
|
||||
<BuildTarget>DEBUG=1 all BOARD_ID=METRO_M4 BOARD_CHIP=__SAMD51J19A__</BuildTarget>
|
||||
<BuildTarget>DEBUG=0 all BOARD_ID=METRO_M4 BOARD_CHIP=__SAMD51J19A__</BuildTarget>
|
||||
<CleanTarget>clean BOARD_ID=METRO_M4</CleanTarget>
|
||||
<ExternalMakeFilePath>Makefile</ExternalMakeFilePath>
|
||||
<OutputPath>bin\metrom4\</OutputPath>
|
||||
<OutputFileName>METRO_M4_sam_ba</OutputFileName>
|
||||
<OutputFileExtension>.elf</OutputFileExtension>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="board_definitions.h">
|
||||
|
|
|
|||
|
|
@ -30,10 +30,16 @@ extern "C" {
|
|||
extern const uint32_t __text_start__;
|
||||
#define APP_START ((volatile uint32_t)(&__text_start__) + 4)
|
||||
|
||||
#else
|
||||
|
||||
#if defined(__SAMD51__)
|
||||
#define APP_START 0x00004004
|
||||
#else
|
||||
#define APP_START 0x00002004
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
static inline bool nvmReady(void) {
|
||||
#if defined(__SAMD51__)
|
||||
return NVMCTRL->STATUS.reg & NVMCTRL_STATUS_READY;
|
||||
|
|
@ -50,7 +56,7 @@ static void banzai() {
|
|||
#if defined(__SAMD51__)
|
||||
//THESE MUST MATCH THE BOOTLOADER
|
||||
#define DOUBLE_TAP_MAGIC 0x07738135
|
||||
#define BOOT_DOUBLE_TAP_ADDRESS 0x20007FFC
|
||||
#define BOOT_DOUBLE_TAP_ADDRESS 0x2002FFFCul
|
||||
|
||||
unsigned long *a = (unsigned long *)BOOT_DOUBLE_TAP_ADDRESS;
|
||||
*a = DOUBLE_TAP_MAGIC;
|
||||
|
|
|
|||
Loading…
Reference in a new issue