Skip to content

Commit

Permalink
Riscv re-factoring (FreeRTOS#1145)
Browse files Browse the repository at this point in the history
* Refactor the trap handler macro
Since `portasmHANDLE_INTERRUPT` is removed at FreeRTOS-kernel, Riscv re-factoring (FreeRTOS#444) (commit: 9efca75)
We don't need this definition anymore
We also remove the unused function definition

* Styling the file header to pass the checker
Remove an extra space

Co-authored-by: ztex <[email protected]>
  • Loading branch information
tony2037 and zyex030640417 authored Dec 21, 2023
1 parent ec25164 commit 660166b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ MAKE = make
GCC_VERSION = $(shell $(CC) --version | grep ^$(CC) | sed 's/^.* //g' | awk -F. '{ printf("%d%02d%02d"), $$1, $$2, $$3 }')
GCC_VERSION_NEED_ZICSR = "110100"

CFLAGS += $(INCLUDE_DIRS) -DportasmHANDLE_INTERRUPT=handle_trap -fmessage-length=0 \
CFLAGS += $(INCLUDE_DIRS) -fmessage-length=0 \
-mabi=ilp32 -mcmodel=medlow -ffunction-sections -fdata-sections \
-Wno-unused-parameter -nostartfiles -g3 -Os

Expand Down
8 changes: 1 addition & 7 deletions FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/riscv-virt.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* FreeRTOS V202212.00
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -56,9 +56,3 @@ size_t i;

portEXIT_CRITICAL();
}

void handle_trap(void)
{
while (1)
;
}

0 comments on commit 660166b

Please sign in to comment.