# FL-M32_Runtime **Repository Path**: aleclea/FL-M32_Runtime ## Basic Information - **Project Name**: FL-M32_Runtime - **Description**: FL-M32软件运行环境 - **Primary Language**: C - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-04-18 - **Last Updated**: 2023-04-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FengLin M32 (FL-M32) SoC Runtime FL-M32 is a small and efficient, 32-bit, RISCV-based SoC for Network processing. FL-M32_Runtime is the runtime environment for FL-M32 SoC, and has implemented some basic functions to simplify C-based development. ## Example [firmware_singleCore_Replace_MAC_Addr](https://gitee.com/lixuan-abc/FL-M32_Runtime/tree/master/firmware_singleCore_Replace_MAC_Addr) is a example C-based program for replace Src and Dst MAC address for all received packets. ## Changelog * 2023/3/22:add RAM_SIZE_KB at Firmware_SingleCore_Runtime/Makefile.sys, which used to calculate RAM_SIZE, INSTR_LEN, DATA_BASE_ADDR and DATA_LEN; RAM_SIZE is lines of firmware.hex, while {INSTR_LEN,...} are used to reconfigure memory size in link/link.ld; Modified in [Makefile.sys](https://gitee.com/lixuan-abc/FL-M32_Runtime/tree/master/Firmware_SingleCore_Runtime/Makefile.sys). RAM_SIZE_KB = 256 #default RAM_SIZE = $(shell expr $(RAM_SIZE_KB) \* 256) INSTR_BASE_ADDR = 0 INSTR_LEN = $(shell expr $(RAM_SIZE_KB) \* 128) DATA_BASE_ADDR = $(INSTR_LEN) DATA_LEN = $(INSTR_LEN) ORIGIN and LENGTH (in [link.ld](https://gitee.com/lixuan-abc/FL-M32_Runtime/tree/master/Firmware_SingleCore_Runtime/link/link.ld)) are auto-configured by Makefile ram (rwxai) : ORIGIN = 0x00000000, LENGTH = 0x10000 ram_data (rwxai) : ORIGIN = 0x00010000, LENGTH = 0x10000 So, you can use makefile with "make RAM_SIZE_KB=128" for 128KB Memory; * 2023/3/22:fix the difination of 32b irq_bitmap (in global_head.v), i.e., `define TIME_IRQ 7 `define UART_IRQ 16 `define GPIO_IRQ 17 `define SPI_IRQ 18 `define CSR_IRQ 19 `define CSRAM_IRQ 20 `define dDMA_IRQ 21 `define DMA_IRQ 22 `define DRA_IRQ 23 * 2023/3/25:add TIMER_IRQ_PROC_IN_ASM in [Makefile.sys](https://gitee.com/lixuan-abc/FL-M32_Runtime/tree/master/Firmware_SingleCore_Runtime/Makefile.sys), which used to compile timer irq processing writen in asm; add DRA_IRQ_PROC_IN_ASM in [Makefile.sys](https://gitee.com/lixuan-abc/FL-M32_Runtime/tree/master/Firmware_SingleCore_Runtime/Makefile.sys), which used to compile dma irq processing writen in asm; TIMER_IRQ_PROC_IN_ASM = 0 DMA_IRQ_PROC_IN_ASM = 0 ifeq ("$(TIMER_IRQ_PROC_IN_ASM)", "1") TIMER_IRQ_IN_ASM = -DTIMER_IRQ_IN_ASM=1 else TIMER_IRQ_IN_ASM = -DTIMER_IRQ_IN_ASM=0 endif ifeq ("$(DMA_IRQ_PROC_IN_ASM)", "1") DMA_IRQ_IN_ASM = -DDMA_IRQ_IN_ASM=1 else DMA_IRQ_IN_ASM = -DDMA_IRQ_IN_ASM=0 endif So, you can use makefile with "make TIMER_IRQ_PROC_IN_ASM=1" to choose processing time irq in asm or "make TIMER_IRQ_PROC_IN_ASM=0" to choose processing time irq in c; it is same to DMA_IRQ_PROC_IN_ASM=1; ## Issues and Troubleshooting If you find any problems or issues with FL-M32 Runtime or the documentation, please check out the issue tracker and create a new issue if your problem is not yet tracked.