diff --git a/bsp/E31/memory.ods b/bsp/E31/memory.ods index 74194cb..c5f8e26 100644 Binary files a/bsp/E31/memory.ods and b/bsp/E31/memory.ods differ diff --git a/bsp/E31/multizone.cfg b/bsp/E31/multizone.cfg index 429b32e..d6efe97 100644 --- a/bsp/E31/multizone.cfg +++ b/bsp/E31/multizone.cfg @@ -1,28 +1,28 @@ # Copyright(C) 2020 Hex Five Security, Inc. - All Rights Reserved -# MultiZone reserved memory: 8K @0x40400000, 6K @0x80000000 +# MultiZone reserved: 8K @0x40400000, 4K @0x08000000, 2K @0x80000000 Tick = 10 # ms Zone = 1 irq = 19 # DMA (Mockup) plic = 17 # UART - base = 0x40402800; size = 30K; rwx = rx # FLASH - base = 0x80001800; size = 4K; rwx = rw # RAM + base = 0x40408000; size = 32K; rwx = rx # FLASH + base = 0x80003000; size = 4K; rwx = rw # RAM base = 0x20000000; size = 0x100; rwx = rw # UART Zone = 2 irq = 20, 21, 22 # BTN0 BTN1 BTN2 (CLINT) - base = 0x4040A000; size = 8K; rwx = rx # FLASH - base = 0x80002800; size = 2K; rwx = rw # RAM + base = 0x40406000; size = 8K; rwx = rx # FLASH + base = 0x80002000; size = 4K; rwx = rw # RAM base = 0x20005000; size = 0x100; rwx = rw # PWM LED base = 0x20002000; size = 0x100; rwx = rw # GPIO Zone = 3 - base = 0x4040C000; size = 8K; rwx = rx # FLASH - base = 0x80003000; size = 3K; rwx = rw # RAM + base = 0x40404000; size = 8K; rwx = rx # FLASH + base = 0x80001000; size = 4K; rwx = rw # RAM base = 0x20002000; size = 0x100; rwx = rw # GPIO Zone = 4 - base = 0x4040E000; size = 8K; rwx = rx # FLASH - base = 0x80003C00; size = 1K; rwx = rw # RAM \ No newline at end of file + base = 0x40403000; size = 4K; rwx = rx # FLASH + base = 0x80000800; size = 2K; rwx = rw # RAM \ No newline at end of file diff --git a/bsp/FE310/memory.ods b/bsp/FE310/memory.ods index f60357e..87a26d9 100644 Binary files a/bsp/FE310/memory.ods and b/bsp/FE310/memory.ods differ diff --git a/bsp/FE310/multizone.cfg b/bsp/FE310/multizone.cfg index 5d99af4..576b6be 100644 --- a/bsp/FE310/multizone.cfg +++ b/bsp/FE310/multizone.cfg @@ -1,28 +1,28 @@ # Copyright(C) 2020 Hex Five Security, Inc. - All Rights Reserved -# MultiZone reserved memory: 8K @0x20010000, 6K @0x80000000 +# MultiZone reserved: 8K @0x20010000, 4K @0x08000000, 2K @0x80000000 Tick = 10 # ms Zone = 1 irq = 19 # DMA (Mockup) plic = 3 # UART - base = 0x20012800; size = 30K; rwx = rx # FLASH - base = 0x80001800; size = 4K; rwx = rw # RAM + base = 0x20018000; size = 32K; rwx = rx # FLASH + base = 0x80003000; size = 4K; rwx = rw # RAM base = 0x10013000; size = 0x100; rwx = rw # UART Zone = 2 #irq = 20, 21, 22 # BTN0 BTN1 BTN2 (CLINT) - base = 0x2001A000; size = 8K; rwx = rx # FLASH - base = 0x80002800; size = 2K; rwx = rw # RAM + base = 0x20016000; size = 8K; rwx = rx # FLASH + base = 0x80002000; size = 4K; rwx = rw # RAM base = 0x10025000; size = 0x100; rwx = rw # PWM LED base = 0x10012000; size = 0x100; rwx = rw # GPIO Zone = 3 - base = 0x2001C000; size = 8K; rwx = rx # FLASH - base = 0x80003000; size = 3K; rwx = rw # RAM + base = 0x20014000; size = 8K; rwx = rx # FLASH + base = 0x80001000; size = 4K; rwx = rw # RAM base = 0x10012000; size = 0x100; rwx = rw # GPIO - + Zone = 4 - base = 0x2001E000; size = 8K; rwx = rx # FLASH - base = 0x80003C00; size = 1K; rwx = rw # RAM \ No newline at end of file + base = 0x20013000; size = 4K; rwx = rx # FLASH + base = 0x80000800; size = 2K; rwx = rw # RAM diff --git a/bsp/S51/memory.lds b/bsp/S51/memory.lds index 728a5fc..072dc75 100644 --- a/bsp/S51/memory.lds +++ b/bsp/S51/memory.lds @@ -1,12 +1,8 @@ /* Copyright(C) 2020 Hex Five Security, Inc. - All Rights Reserved */ flash = 0x40400000; -itim = 0x08000000; /* 16K */ -dtim = 0x80000800; /* 64K */ +itim = 0x01800000; /* 16K */ +dtim = 0x80000200; /* 64K */ -/* Note: - dtim start value increased +2K to make room for the larger 8K rv64 kernel - while allowing for unchanged dtim/ram offsets in the zones linker sripts - that fit the smaller 6K rv32 kernel and the DTIM 16K size limit imposed - by the FE310 -*/ \ No newline at end of file +/* Note: dtim start value increased by +512B to offest the larger rv64 kernel + without changing dtim offests in the zones' linker sripts */ \ No newline at end of file diff --git a/bsp/S51/memory.ods b/bsp/S51/memory.ods index adf0257..27eb57e 100644 Binary files a/bsp/S51/memory.ods and b/bsp/S51/memory.ods differ diff --git a/bsp/S51/multizone.cfg b/bsp/S51/multizone.cfg index 28092c5..371bf93 100644 --- a/bsp/S51/multizone.cfg +++ b/bsp/S51/multizone.cfg @@ -1,28 +1,28 @@ # Copyright(C) 2020 Hex Five Security, Inc. - All Rights Reserved -# MultiZone reserved memory: 8K @0x40400000, 8K @0x80000000 +# MultiZone reserved: 8K @0x40400000, 4K @0x01800000, 2.5K @0x80000000 Tick = 10 # ms Zone = 1 irq = 19 # DMA (Mockup) plic = 17 # UART - base = 0x40402800; size = 30K; rwx = rx # FLASH - base = 0x80002000; size = 4K; rwx = rw # RAM + base = 0x40408000; size = 32K; rwx = rx # FLASH + base = 0x80003200; size = 4K; rwx = rw # RAM base = 0x20000000; size = 0x100; rwx = rw # UART Zone = 2 irq = 20, 21, 22 # BTN0 BTN1 BTN2 (CLINT) - base = 0x4040A000; size = 8K; rwx = rx # FLASH - base = 0x80003000; size = 2K; rwx = rw # RAM + base = 0x40406000; size = 8K; rwx = rx # FLASH + base = 0x80002200; size = 4K; rwx = rw # RAM base = 0x20005000; size = 0x100; rwx = rw # PWM LED base = 0x20002000; size = 0x100; rwx = rw # GPIO Zone = 3 - base = 0x4040C000; size = 8K; rwx = rx # FLASH - base = 0x80003800; size = 3K; rwx = rw # RAM + base = 0x40404000; size = 8K; rwx = rx # FLASH + base = 0x80001200; size = 4K; rwx = rw # RAM base = 0x20002000; size = 0x100; rwx = rw # GPIO Zone = 4 - base = 0x4040E000; size = 8K; rwx = rx # FLASH - base = 0x80004400; size = 1K; rwx = rw # RAM + base = 0x40403000; size = 4K; rwx = rx # FLASH + base = 0x80000A00; size = 2K; rwx = rw # RAM \ No newline at end of file diff --git a/bsp/X300/memory.ods b/bsp/X300/memory.ods index 7b004bc..d5d95df 100644 Binary files a/bsp/X300/memory.ods and b/bsp/X300/memory.ods differ diff --git a/bsp/X300/multizone.cfg b/bsp/X300/multizone.cfg index b8b164e..fdf8ea2 100644 --- a/bsp/X300/multizone.cfg +++ b/bsp/X300/multizone.cfg @@ -1,28 +1,28 @@ # Copyright(C) 2020 Hex Five Security, Inc. - All Rights Reserved -# MultiZone reserved memory: 8K @0x20400000, 6K @0x80000000 +# MultiZone reserved: 8K @0x20400000, 4K @0x08000000, 2K @0x80000000 Tick = 10 # ms Zone = 1 irq = 19 # DMA (Mockup) plic = 3 # UART - base = 0x20402800; size = 30K; rwx = rx # FLASH - base = 0x80001800; size = 4K; rwx = rw # RAM + base = 0x20408000; size = 32K; rwx = rx # FLASH + base = 0x80003000; size = 4K; rwx = rw # RAM base = 0x10013000; size = 0x100; rwx = rw # UART Zone = 2 irq = 16, 17, 18 # BTN0 BTN1 BTN2 (CLINT) - base = 0x2040A000; size = 8K; rwx = rx # FLASH - base = 0x80002800; size = 2K; rwx = rw # RAM + base = 0x20406000; size = 8K; rwx = rx # FLASH + base = 0x80002000; size = 4K; rwx = rw # RAM base = 0x10025000; size = 0x100; rwx = rw # PWM LED base = 0x10012000; size = 0x100; rwx = rw # GPIO Zone = 3 - base = 0x2040C000; size = 8K; rwx = rx # FLASH - base = 0x80003000; size = 3K; rwx = rw # RAM + base = 0x20404000; size = 8K; rwx = rx # FLASH + base = 0x80001000; size = 4K; rwx = rw # RAM base = 0x10012000; size = 0x100; rwx = rw # GPIO Zone = 4 - base = 0x2040E000; size = 8K; rwx = rx # FLASH - base = 0x80003C00; size = 1K; rwx = rw # RAM + base = 0x20403000; size = 4K; rwx = rx # FLASH + base = 0x80000800; size = 2K; rwx = rw # RAM diff --git a/ext/FreeRTOSConfig.h b/ext/FreeRTOSConfig.h index cb7cf5f..8b71f17 100644 --- a/ext/FreeRTOSConfig.h +++ b/ext/FreeRTOSConfig.h @@ -11,7 +11,7 @@ your application. */ set configUSE_TICKLESS_IDLE 1 and configUSE_IDLE_HOOK 0 to enable MultiZone vPortSuppressTicksAndSleep() */ -#define configISR_STACK_SIZE_WORDS (30) +#define configISR_STACK_SIZE_WORDS (100) #define configMTIME_BASE_ADDRESS ( CLINT_BASE + CLINT_MTIME ) #define configMTIMECMP_BASE_ADDRESS ( CLINT_BASE + CLINT_MTIMECMP ) @@ -22,7 +22,7 @@ MultiZone vPortSuppressTicksAndSleep() */ #define configCPU_CLOCK_HZ ( (TickType_t) RTC_FREQ ) #define configTICK_RATE_HZ ( (TickType_t) 1000 ) #define configMAX_PRIORITIES 2 -#define configMINIMAL_STACK_SIZE 72 +#define configMINIMAL_STACK_SIZE 100 // #define configMAX_TASK_NAME_LEN 16 #define configUSE_16_BIT_TICKS 0 // #define configIDLE_SHOULD_YIELD 1 @@ -43,7 +43,7 @@ MultiZone vPortSuppressTicksAndSleep() */ /* Memory allocation related definitions. */ // #define configSUPPORT_STATIC_ALLOCATION 1 // #define configSUPPORT_DYNAMIC_ALLOCATION 1 -#define configTOTAL_HEAP_SIZE 2080 +#define configTOTAL_HEAP_SIZE 2704 // #define configAPPLICATION_ALLOCATED_HEAP 1 /* Hook function related definitions. */ diff --git a/multizone-sdk.launch b/multizone-sdk.launch index 9df2027..f3481a0 100644 --- a/multizone-sdk.launch +++ b/multizone-sdk.launch @@ -60,6 +60,6 @@ - + diff --git a/multizone.jar b/multizone.jar index eef2472..63f7783 100644 Binary files a/multizone.jar and b/multizone.jar differ diff --git a/zone1/linker.lds b/zone1/linker.lds index fca6805..49e0295 100644 --- a/zone1/linker.lds +++ b/zone1/linker.lds @@ -5,9 +5,9 @@ OUTPUT_ARCH( "riscv" ) ENTRY( _start ) MEMORY { - flash (rxai!w) : ORIGIN = flash + 0x2800, LENGTH = 30K - prog (rxai!w) : ORIGIN = flash + 0x2800, LENGTH = 30K - ram (wa!xri) : ORIGIN = dtim + 0x1800, LENGTH = 4K + flash (rxai!w) : ORIGIN = flash + 0x8000, LENGTH = 32K + prog (rxai!w) : ORIGIN = flash + 0x8000, LENGTH = 32K + ram (wa!xri) : ORIGIN = dtim + 0x3000, LENGTH = 4K } SECTIONS { diff --git a/zone2/linker.lds b/zone2/linker.lds index 4e469ca..bc8bd2c 100644 --- a/zone2/linker.lds +++ b/zone2/linker.lds @@ -5,9 +5,9 @@ OUTPUT_ARCH( "riscv" ) ENTRY( _start ) MEMORY { - flash (rxai!w) : ORIGIN = flash + 0xA000, LENGTH = 8K - prog (rxai!w) : ORIGIN = flash + 0xA000, LENGTH = 8K - ram (wa!xri) : ORIGIN = dtim + 0x2800, LENGTH = 2K + flash (rxai!w) : ORIGIN = flash + 0x6000, LENGTH = 8K + prog (rxai!w) : ORIGIN = flash + 0x6000, LENGTH = 8K + ram (wa!xri) : ORIGIN = dtim + 0x2000, LENGTH = 4K } SECTIONS { diff --git a/zone3.1/main.c b/zone3.1/main.c index 032c2e4..47075c3 100644 --- a/zone3.1/main.c +++ b/zone3.1/main.c @@ -94,7 +94,7 @@ int main (void){ xTaskCreate(msg_handler_task, "msg_handler_task", configMINIMAL_STACK_SIZE, NULL, 1, &msg_handler_task_handle); /* Create the task. */ - xTaskCreate(spi_poll_task, "spi_poll_task", configMINIMAL_STACK_SIZE, NULL, 1, &spi_poll_task_handle); + xTaskCreate(spi_poll_task, "spi_poll_task", configMINIMAL_STACK_SIZE, NULL, 0, &spi_poll_task_handle); /* Create the task. */ xTaskCreate(robot_cmd_task, "robot_cmd_task", configMINIMAL_STACK_SIZE, NULL, 1, &robot_cmd_task_handle); diff --git a/zone3/linker.lds b/zone3/linker.lds index 074a1c5..a017938 100644 --- a/zone3/linker.lds +++ b/zone3/linker.lds @@ -5,14 +5,14 @@ OUTPUT_ARCH( "riscv" ) ENTRY( _start ) MEMORY { - flash (rxai!w) : ORIGIN = flash + 0xC000, LENGTH = 8K - prog (rxai!w) : ORIGIN = flash + 0xC000, LENGTH = 8K - ram (wa!xri) : ORIGIN = dtim + 0x3000, LENGTH = 3K + flash (rxai!w) : ORIGIN = flash + 0x4000, LENGTH = 8K + prog (rxai!w) : ORIGIN = flash + 0x4000, LENGTH = 8K + ram (wa!xri) : ORIGIN = dtim + 0x1000, LENGTH = 4K } SECTIONS { - __stack_size = DEFINED(__stack_size) ? __stack_size : 128; + __stack_size = DEFINED(__stack_size) ? __stack_size : 256; PROVIDE(__stack_size = __stack_size); diff --git a/zone4/linker.lds b/zone4/linker.lds index 6057269..460aaca 100644 --- a/zone4/linker.lds +++ b/zone4/linker.lds @@ -5,9 +5,9 @@ OUTPUT_ARCH( "riscv" ) ENTRY( _start ) MEMORY { - flash (rxai!w) : ORIGIN = flash + 0xE000, LENGTH = 8K - prog (rxai!w) : ORIGIN = flash + 0xE000, LENGTH = 8K - ram (wa!xri) : ORIGIN = dtim + 0x3C00, LENGTH = 1K + flash (rxai!w) : ORIGIN = flash + 0x3000, LENGTH = 4K + prog (rxai!w) : ORIGIN = flash + 0x3000, LENGTH = 4K + ram (wa!xri) : ORIGIN = dtim + 0x0800, LENGTH = 2K } SECTIONS {