diff options
Diffstat (limited to 'source/application')
3 files changed, 43 insertions, 1 deletions
diff --git a/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.ld b/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.ld index ceaff7d..e5c2a14 100644 --- a/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.ld +++ b/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.ld @@ -26,6 +26,13 @@ MEMORY BRAM (rwx) : ORIGIN = 0x11000000, LENGTH = 0x00200000 SRAM (rwx) : ORIGIN = 0x31000000, LENGTH = 0x00400000 DDR (rwx) : ORIGIN = 0x70000000, LENGTH = 0x02000000 + + /* Dynamic load regions declared for use by FVP only + * These regions are mentioned in the CMake subsystem profile. + * Do not change the addresses here in isolation. */ + DDR_dynamic_model (rx) : ORIGIN = 0x90000000, LENGTH = 0x02000000 + DDR_dynamic_ifm (rx) : ORIGIN = 0x92000000, LENGTH = 0x01000000 + DDR_dynamic_ofm (rx) : ORIGIN = 0x93000000, LENGTH = 0x01000000 } /* Linker script to place sections and symbol values. Should be used together diff --git a/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.sct b/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.sct index dd53a57..4760875 100644 --- a/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.sct +++ b/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.sct @@ -115,4 +115,28 @@ LOAD_REGION_1 0x70000000 0x02000000 ;----------------------------------------------------- ARM_LIB_HEAP 0x11040000 EMPTY ALIGN 8 0x000F0000 {} + + ;----------------------------------------------------- + ; The following regions are for use by the FVP to + ; allow loading or dumping of dynamic data into or + ; from the memory. These regions are mentioned in + ; the CMake subsystem profile. Do not change the + ; addresses and sizes below in isolation. + ;----------------------------------------------------- + ; 32 MiB of model space for run-time load of model + ;----------------------------------------------------- + runtime_model 0x90000000 EMPTY ALIGN 16 0x02000000 + {} + + ;----------------------------------------------------- + ; 16 MiB of IFM space for run-time loading (FVP only) + ;----------------------------------------------------- + runtime_ifm 0x92000000 EMPTY ALIGN 16 0x01000000 + {} + + ;----------------------------------------------------- + ; 16 MiB of OFM space for run-time loading (FVP only) + ;----------------------------------------------------- + runtime_ofm 0x93000000 EMPTY ALIGN 16 0x01000000 + {} } diff --git a/source/application/main/UseCaseCommonUtils.cc b/source/application/main/UseCaseCommonUtils.cc index 9834475..a99e05d 100644 --- a/source/application/main/UseCaseCommonUtils.cc +++ b/source/application/main/UseCaseCommonUtils.cc @@ -136,6 +136,7 @@ bool image::PresentInferenceResult(hal_platform &platform, void IncrementAppCtxIfmIdx(arm::app::ApplicationContext& ctx, std::string useCase) { +#if NUMBER_OF_FILES > 0 auto curImIdx = ctx.Get<uint32_t>(useCase); if (curImIdx + 1 >= NUMBER_OF_FILES) { @@ -144,10 +145,15 @@ void IncrementAppCtxIfmIdx(arm::app::ApplicationContext& ctx, std::string useCas } ++curImIdx; ctx.Set<uint32_t>(useCase, curImIdx); +#else /* NUMBER_OF_FILES > 0 */ + UNUSED(ctx); + UNUSED(useCase); +#endif /* NUMBER_OF_FILES > 0 */ } bool SetAppCtxIfmIdx(arm::app::ApplicationContext& ctx, uint32_t idx, std::string ctxIfmName) { +#if NUMBER_OF_FILES > 0 if (idx >= NUMBER_OF_FILES) { printf_err("Invalid idx %" PRIu32 " (expected less than %u)\n", idx, NUMBER_OF_FILES); @@ -155,9 +161,14 @@ bool SetAppCtxIfmIdx(arm::app::ApplicationContext& ctx, uint32_t idx, std::strin } ctx.Set<uint32_t>(ctxIfmName, idx); return true; +#else /* NUMBER_OF_FILES > 0 */ + UNUSED(ctx); + UNUSED(idx); + UNUSED(ctxIfmName); + return false; +#endif /* NUMBER_OF_FILES > 0 */ } - namespace arm { namespace app { |