Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,6 @@ ifeq ($(ARCH), AURIX_TC3)
# TC3xx specific
ifeq ($(TARGET), aurix_tc3xx)
USE_GCC?=1
ARCH_FLASH_OFFSET=0x00000000

CFLAGS += -I$(TC3_DIR) -Ihal

Expand Down Expand Up @@ -1408,6 +1407,7 @@ ifeq ($(ARCH), AURIX_TC3)
endif

ifeq ($(AURIX_TC3_HSM),1)
ARCH_FLASH_OFFSET=0x80028000
# HSM compiler flags, build options, source code, etc
ifeq ($(USE_GCC),1)
# Just arm-none-eabi-gcc for now
Expand Down Expand Up @@ -1476,6 +1476,7 @@ ifeq ($(ARCH), AURIX_TC3)

else
# Tricore compiler settings
ARCH_FLASH_OFFSET=0x800A0000
ifeq ($(USE_GCC),1)
HT_ROOT?=/opt/hightec/gnutri_v4.9.4.1-11fcedf-lin64
CROSS_COMPILE?=$(HT_ROOT)/bin/tricore-
Expand Down
18 changes: 11 additions & 7 deletions hal/aurix_tc3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,13 @@ void do_boot(const uint32_t* app_offset)
}
#endif

void arch_reboot(void)
RAMFUNCTION void arch_reboot(void)
{
#ifdef WOLFBOOT_AURIX_TC3XX_HSM
tc3arm_HsmBridgeSysReset();
#else
tc3_Scu_TriggerSwReset(1, WOLFBOOT_AURIX_RESET_REASON);
#endif
}

/* Programs unaligned input data to flash, assuming the underlying memory is
Expand Down Expand Up @@ -612,15 +616,15 @@ int RAMFUNCTION hal_flash_erase(uint32_t address, int len)
/* If the IAP interface of the flash memory of the target requires it, this
* function is called before every write and erase operations to unlock write
* access to the flash. On some targets, this function may be empty. */
void hal_flash_unlock(void) {}
RAMFUNCTION void hal_flash_unlock(void) {}

/* If the IAP interface of the flash memory requires locking/unlocking, this
* function restores the flash write protection by excluding write accesses.
* This function is called by the bootloader at the end of every write and erase
* operations. */
void hal_flash_lock(void) {}
RAMFUNCTION void hal_flash_lock(void) {}

int ext_flash_write(uintptr_t address, const uint8_t* data, int len)
RAMFUNCTION int ext_flash_write(uintptr_t address, const uint8_t* data, int len)
{
return hal_flash_write(address, data, len);
}
Expand Down Expand Up @@ -685,17 +689,17 @@ int RAMFUNCTION ext_flash_read(uintptr_t address, uint8_t* data, int len)
return 0;
}

int ext_flash_erase(uintptr_t address, int len)
RAMFUNCTION int ext_flash_erase(uintptr_t address, int len)
{
return hal_flash_erase(address, len);
}

void ext_flash_lock(void)
RAMFUNCTION void ext_flash_lock(void)
{
hal_flash_lock();
}

void ext_flash_unlock(void)
RAMFUNCTION void ext_flash_unlock(void)
{
hal_flash_unlock();
}
Expand Down