Skip to content

Commit

Permalink
spider: update ethernet example to use 'lwip' Trampoline library
Browse files Browse the repository at this point in the history
  • Loading branch information
fsylvestre committed Nov 15, 2023
1 parent dd25bb1 commit 0cfa5d5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
30 changes: 16 additions & 14 deletions examples/cortex-a-r/armv8/spider/ethernet/eth.oil
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,17 @@ CPU eth {
BUILD = TRUE {
TRAMPOLINE_BASE_PATH = "../../../../..";
APP_SRC = "main.c";
APP_SRC = "utils.c";
APP_SRC = "eth_serdes.c";
APP_SRC = "rswitch.c";
APP_SRC = "eth_gptp.c";
APP_SRC = "printf.c";
APP_SRC = "lwip-port/sys_arch.c";
APP_SRC = "lwip-port/ethif.c";
APP_NAME = "eth_exe.elf";
CFLAGS = "-O0 -g -DHSCIF_1843200BPS -I. -Ilwip/src/include -Ilwip-port";
LDFLAGS = "-Map=eth_exe.map -L. -llwipcore -llwipallapps";
CFLAGS = "-O0 -g -DHSCIF_1843200BPS -DNO_SYS";
LDFLAGS = "-Map=eth_exe.map";
COMPILER = "arm-none-eabi-gcc";
CPPCOMPILER = "arm-none-eabi-g++";
ASSEMBLER = "arm-none-eabi-as";
LINKER = "arm-none-eabi-ld";
COPIER = "arm-none-eabi-objcopy";
SYSTEM = PYTHON;
LIBRARY = serial;
LIBRARY = lwip;
};
SYSTEM_CALL = TRUE;
MEMMAP = TRUE {
Expand All @@ -60,33 +54,41 @@ CPU eth {
SCHEDULE = FULL;
};

/* ethernet driver needs */
TASK gwca1_rx_tx_task {
PRIORITY = 2;
AUTOSTART = FALSE;
ACTIVATION = 1;
SCHEDULE = FULL;
};

ISR gwca1_rx_tx_int {
CATEGORY = 2;
PRIORITY = 1;
PRIORITY = 2;
SOURCE = GWCA1_RX_TX_INT;
};

ISR gwca1_rx_ts_int {
CATEGORY = 2;
PRIORITY = 2;
PRIORITY = 3;
SOURCE = GWCA1_RX_TS_INT;
};

ISR coma_err_int {
CATEGORY = 2;
PRIORITY = 3;
PRIORITY = 4;
SOURCE = COMA_ERR_INT;
};

ISR gwca1_err_int {
CATEGORY = 2;
PRIORITY = 4;
PRIORITY = 5;
SOURCE = GWCA1_ERR_INT;
};

ISR etha0_err_int {
CATEGORY = 2;
PRIORITY = 5;
PRIORITY = 6;
SOURCE = ETHA0_ERR_INT;
};
};
6 changes: 3 additions & 3 deletions examples/cortex-a-r/armv8/spider/ethernet/main.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "tpl_os.h"
#include "utils.h"
#include "serial.h"
#include "spider_serial.h"
#include "string.h"
#include "lwip/netif.h"
#include "lwip/ip4_addr.h"
#include "lwip/timeouts.h"
#include "lwip-port/ethif.h"
#include "ethif.h"

#define APP_Task_sample_init_START_SEC_CODE
#include "tpl_memmap.h"
Expand Down Expand Up @@ -55,4 +55,4 @@ TASK(monitor) {
}

#define APP_Task_sample_init_STOP_SEC_CODE
#include "tpl_memmap.h"
#include "tpl_memmap.h"

0 comments on commit 0cfa5d5

Please sign in to comment.