Skip to content

Commit

Permalink
SoC/evalsoc: Fix undeclared exc_entry when CFG_HAS_TRAP_CSR macro def…
Browse files Browse the repository at this point in the history
…ined

Error like this error: 'exc_entry' undeclared (first use in this function)

Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Sep 26, 2024
1 parent 6b434fa commit a6fb722
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SoC/evalsoc/Common/Include/cpufeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ extern "C" {
// EXCP is the exception module, if not defined, it means not present
// If not present, you need to remove .exception section in linker script
#define CFG_HAS_EXCP

// Define it when you have TRAP related CSR such as MTVT and MTVEC
//#define CFG_HAS_TRAP_CSR

// PMONITOR is the mcycle and minsret counter, if not defined, it means not present
#define CFG_HAS_PMONITOR

Expand Down
4 changes: 4 additions & 0 deletions SoC/evalsoc/Common/Source/system_evalsoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
#define SYSTEM_CLOCK (16000000UL)
#endif

#ifdef CFG_HAS_EXCP
extern void exc_entry(void);
#endif

/**
* \defgroup NMSIS_Core_SystemConfig System Device Configuration
* \brief Functions for system and clock setup available in system_<device>.c.
Expand Down

0 comments on commit a6fb722

Please sign in to comment.