Skip to content

Commit

Permalink
Fixed same51 test application
Browse files Browse the repository at this point in the history
- removed ".config" sections from linker script
- don't initialize SERCOM5 twice
  • Loading branch information
danielinux committed Feb 13, 2024
1 parent 664d2ae commit fbd5c23
Show file tree
Hide file tree
Showing 39 changed files with 8 additions and 52 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,5 @@ debug/lauterbach
*.gcda
*.gcno
coverage.*
/IDE/MPLabX/wolfBoot-SAME51.X/dist/
/IDE/MPLabX/wolfBoot_usbUpdateApp.X/dist/
IDE/MPLAB/test-app/test-usb-updater.same51.X/dist/
IDE/MPLAB/test-app/test-usb-updater.same51.X/.generated_files
16 changes: 2 additions & 14 deletions IDE/MPLAB/test-app/src/config/default/ATSAME51J20A.ld
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,11 @@ ENTRY(__XC32_RESET_HANDLER_NAME)
*************************************************************************/
MEMORY
{
rom (LRX) : ORIGIN = ROM_ORIGIN, LENGTH = ROM_LENGTH
rom (LRX) : ORIGIN = ROM_ORIGIN, LENGTH = (ROM_LENGTH - 0x8200)
ram (WX!R) : ORIGIN = RAM_ORIGIN, LENGTH = RAM_LENGTH
tcm (WX) : ORIGIN = TCM_ORIGIN, LENGTH = __XC32_TCM_LENGTH
bkupram : ORIGIN = BKUPRAM_ORIGIN, LENGTH = BKUPRAM_LENGTH
config_00804000 : ORIGIN = 0x00804000, LENGTH = 0x4
config_00804004 : ORIGIN = 0x00804004, LENGTH = 0x4
config_00804008 : ORIGIN = 0x00804008, LENGTH = 0x4


}
/*************************************************************************
Expand Down Expand Up @@ -150,16 +148,6 @@ __ram_end = ORIGIN(ram) + LENGTH(ram);
*************************************************************************/
SECTIONS
{
.config_00804000 : {
KEEP(*(.config_00804000))
} > config_00804000
.config_00804004 : {
KEEP(*(.config_00804004))
} > config_00804004
.config_00804008 : {
KEEP(*(.config_00804008))
} > config_00804008

/*
* The linker moves the .vectors section into itcm when itcm is
* enabled via the -mitcm option, but only when this .vectors output
Expand Down
2 changes: 2 additions & 0 deletions IDE/MPLAB/test-app/src/config/default/initialization.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
// Section: Configuration Bits
// ****************************************************************************
// ****************************************************************************
#if 0
#pragma config BOD33_DIS = SET
#pragma config BOD33USERLEVEL = 0x1cU
#pragma config BOD33_ACTION = RESET
Expand All @@ -67,6 +68,7 @@
#pragma config WDT_EWOFFSET = CYC8192
#pragma config WDT_WEN = CLEAR
#pragma config NVMCTRL_REGION_LOCKS = 0xffffffffU
#endif



Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions IDE/MPLAB/test-app/test-usb-updater.same51.X/app.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/* app.c
*
* Copyright (C) 2024 wolfSSL Inc.
Expand Down Expand Up @@ -44,7 +43,8 @@ void APP_Initialize(void) {
uint8_t *v_array = (uint8_t *) & ver;
unsigned char cmd;

SERCOM5_USART_Initialize();
SERCOM5_USART_ReceiverEnable();
SERCOM5_USART_TransmitterEnable();
SERCOM5_USART_Enable();
#ifdef HAVE_LIBWOLFBOOT
wolfBoot_success();
Expand Down

0 comments on commit fbd5c23

Please sign in to comment.