Skip to content

CheriFreeRTOS hmka2 merge #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 67 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
40af848
Modbus: Create target for modbus demo on CheriBSD
dodsonmg Jun 17, 2020
b74f32a
FreeRTOS: add compartments demo
heshamelmatary Sep 2, 2020
e01c054
FreeRTOS: Add TCP/IP peekpoke demo that runs on QEMU/virtio
heshamelmatary Oct 21, 2020
7470aff
FreeRTOS: adds modbus demo apps
dodsonmg Oct 23, 2020
cc7d17d
FreeRTOS: Add a comprehensive servers demo
heshamelmatary Oct 25, 2020
94a87c3
FreeRTOS: Support building demos with waf build system
heshamelmatary Nov 3, 2020
cdb159e
FreeRTOS/run-qemu: add port forwarding support for servers
heshamelmatary Nov 4, 2020
f511c7e
FreeRTOS: Default build system to waf
heshamelmatary Nov 4, 2020
9f08b39
FreeRTOS: Support building with GCC
heshamelmatary Nov 4, 2020
3e4ca21
FreeRTOS/run-qemu: add TFTP port forwarding
heshamelmatary Nov 6, 2020
170eb4b
FreeRTOS: Add a compartmentalize switch
heshamelmatary Nov 23, 2020
a5c4b45
FreeRTOS: Provide an option to use a VirtIO Block disk image
heshamelmatary Dec 31, 2020
6ab91fb
FreeRTOS: Build from the new official FreeRTOS-forked GitHub repo
heshamelmatary Jan 2, 2021
1bc6db5
FreeRTOS: Add AWS OTA Demo
heshamelmatary Jan 8, 2021
15f26e8
FreeRTOS: Add debug and create_disk_image flags
heshamelmatary Jan 30, 2021
f7d44e4
FreeRTOS: Add libs compartmentalization_mode
heshamelmatary Feb 6, 2021
4911cd3
Delete standalone modbus
heshamelmatary Feb 17, 2021
b7aad5d
FreeRTOS: Add IP command line options
heshamelmatary Feb 18, 2021
d4f7f2d
FreeRTOS: Skip checking for supported demos
heshamelmatary Feb 19, 2021
070c513
FreeRTOS: Add CoreMark and MiBench demos
heshamelmatary Feb 19, 2021
63739c0
FreeRTOS: Set netmask part of the IP flag
heshamelmatary Feb 19, 2021
2c7acff
FreeRTOS: Support new Galois/FreeRTOS demo builds
heshamelmatary Feb 19, 2021
72aa692
Add support for building riscv32 baremetal targets
heshamelmatary Nov 9, 2020
cfb4343
FreeRTOS: Fix reversed riscv-abi flags
heshamelmatary Feb 19, 2021
9e98aba
FreeRTOS: Add IPC Benchmark demo
heshamelmatary Mar 11, 2021
ef0e9ce
FreeRTOS/qemu: forward UDP logging port
heshamelmatary Mar 11, 2021
aa34b72
FreeRTOS: Add an option to print over UDP
heshamelmatary Mar 15, 2021
14eb71d
LLVM: Use cherifreertos-gprel branch
heshamelmatary Mar 15, 2021
23bf8aa
FreeRTOS: Remove assert to allow 32-bit baremetal builds
heshamelmatary Mar 15, 2021
f36ce02
run: Add a simplified script of vcu118-run for baremetal
heshamelmatary Mar 18, 2021
7d613bb
vcu118-baremetal: Parametrize expected output timeout
heshamelmatary Mar 18, 2021
ff8f921
FreeRTOS: Add --mem-start option
heshamelmatary May 13, 2021
cf552f4
FreeRTOS: Add Galois' cyberphys demo
heshamelmatary May 13, 2021
fb25d09
FreeRTOS: QEMU - Forward port 5002 for CAN messages
heshamelmatary May 13, 2021
edc3dbd
FreeRTOS: pass riscv arch and abi options to waf/wscript
heshamelmatary May 14, 2021
829d176
FreeRTOS: Refactor modbus demo to use a separate unified directory
heshamelmatary May 17, 2021
426e257
Workaround to avoid hangs when running cheribuild from scripts
heshamelmatary May 18, 2021
a79b585
Add --riscv-float-abi command line option
heshamelmatary Jun 3, 2021
fda84b6
Baremetal/riscv: Compile softfloat by default and add an option for h…
heshamelmatary Jun 3, 2021
7ca0c5f
Jenkinsfile: Comment emailing Alex on failures
heshamelmatary Jun 3, 2021
3638adf
run_qemu: Forward NBNS (NetBIOS) port
heshamelmatary Jun 10, 2021
682cf47
llvm: Use cherifreertos-gprel-dev branch for CheriFreeRTOS
heshamelmatary Jun 10, 2021
99a052d
GDB: Fetch and build from hmka2 branch that has CheriFreeRTOS solib s…
heshamelmatary Jun 26, 2021
b10c989
[CHERI-RISC-V] Add an option to build with CHERI-RVC (Compressed inst…
heshamelmatary Jul 9, 2021
c0181ff
[CHERI-RISC-V] Only pass -mxcheri-rvc if building purecap
heshamelmatary Jul 9, 2021
10ba814
Optionally enable cheri-rvc for hybrid + purecap
heshamelmatary Jul 9, 2021
7791052
CheriFreeRTOS/compiler-rt: Do not hide symbols
heshamelmatary Jul 11, 2021
0623d1f
FreeRTOS: Add an option to build lib projects with gprel ABI
heshamelmatary Jul 13, 2021
6a79a59
FreeRTOS: Rename newlib and compiler-rt libs built with gprel ABI
heshamelmatary Jul 13, 2021
83a35b4
Install compiler-rt-builtins to sysroot and not compiler resources di…
heshamelmatary Jul 15, 2021
0203e07
vcu118-run.py: Add a delay between openocd/gdb connections
heshamelmatary Jul 18, 2021
c800289
FreeRTOS: Add an option to compartmentalize standard libs
heshamelmatary Aug 9, 2021
f2df08f
FreeRTOS: Add options to plot compartmetns and get LoC stats
heshamelmatary Aug 23, 2021
6882902
FreeRTOS: Fix plot and loc arg options
heshamelmatary Aug 28, 2021
ff454c3
FreeRTOS: Avoid building the demo twice
heshamelmatary Aug 28, 2021
4c8e9fb
FreeRTOS: Remove an obselete compartments demo
heshamelmatary Aug 28, 2021
62e85cc
FreeRTOS: pass cheribuild's CFLAGS to FreeRTOS/waf
heshamelmatary Sep 4, 2021
789698a
Merge remote-tracking branch 'origin/master' into hmka2
heshamelmatary Sep 9, 2021
38295d8
llvm: Override the branch on the right repository
jrtc27 Sep 9, 2021
05b41fc
newlib: Add baremetal-riscv32-hybrid to supported architectures
jrtc27 Oct 18, 2021
5868fa7
FreeRTOS: Add an option to enable MPU protection
heshamelmatary Nov 17, 2021
0ed599d
vcu118-run-baremetal: Use python serial instead of picocom
heshamelmatary Dec 13, 2021
06934cf
llvm: Use the latest rebased freertos branch
heshamelmatary May 2, 2022
6140ba6
Add --implicit-mem-0 option to FreeRTOS demos to disable zero-init (#…
theturboturnip May 20, 2024
0a864a9
Merge branch 'hmka2' into freertos-update
heshamelmatary Mar 10, 2025
d2967a1
FreeRTOS: Fixes after merge
heshamelmatary Mar 20, 2025
4474b90
QEMU: Allow baremetal software with bios only
heshamelmatary Mar 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pycheribuild/config/chericonfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ def __init__(self, loader, action_class: "type[CheribuildActionEnum]") -> None:
group=loader.cross_compile_options_group,
help="The floating point/SIMD mode to use for building AArch64 programs",
)

self.riscv_baremetal_hardfloat = loader.add_bool_option("riscv-baremetal-hardfloat", default=False,
group=loader.cross_compile_options_group,
help="Use hard floating point ABI for building CHERI-RISC-V programs")
self.riscv_cheri_gprel = loader.add_bool_option("riscv-cheri-gprel", default=False,
group=loader.cross_compile_options_group,
help="Build CHERI-RISC-V libs with gprel ABI for CheriFreeRTOS compartmentalization")

self.crosscompile_linkage = loader.add_option(
"cross-compile-linkage",
default=Linkage.DEFAULT,
Expand Down
9 changes: 8 additions & 1 deletion pycheribuild/config/compilation_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,16 @@ def essential_compiler_and_linker_flags_impl(
result.append("-mabi=" + cls.get_riscv_abi(xtarget, softfloat=softfloat))
result.append("-mrelax" if _linker_supports_riscv_relaxations(instance.linker, config) else "-mno-relax")

softfloat = not config.riscv_baremetal_hardfloat

if cls.is_baremetal() or cls.is_rtems():
# Both RTEMS and baremetal FreeRTOS are linked above 0x80000000
result.append("-mcmodel=medany")
result.append("-mcmodel=medium")

if config.riscv_cheri_gprel:
if xtarget.is_cheri_purecap():
result.append("-cheri-cap-table-abi=gprel")

elif xtarget.is_aarch64(include_purecap=True):
fp_simd_option = AArch64FloatSimdOptions.SOFT if softfloat else config.aarch64_fp_and_simd_options
march_suffix = fp_simd_option.clang_march_flag()
Expand Down
12 changes: 8 additions & 4 deletions pycheribuild/projects/cross/compiler_rt.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,14 @@ def install(self, **kwargs):
if self.target_info.is_rtems():
self.move_file(self.install_dir / "lib/rtems5" / libname, self.install_dir / "lib" / libname)
elif self.target_info.is_baremetal():
self.move_file(self.install_dir / "lib/baremetal" / libname, self.real_install_root_dir / "lib" / libname)
self.create_symlink(
self.install_dir / "lib" / libname, self.install_dir / "lib/libgcc.a", print_verbose_only=False
)
if self.config.riscv_cheri_gprel:
gprel_libname = "libclang_rt.builtins-" + self.triple_arch + "-gprel.a"
self.move_file(self.install_dir / "lib/baremetal" / libname, self.real_install_root_dir / "lib" / gprel_libname)
else:
self.move_file(self.install_dir / "lib/baremetal" / libname, self.real_install_root_dir / "lib" / libname)
self.create_symlink(
self.install_dir / "lib" / libname, self.install_dir / "lib/libgcc.a", print_verbose_only=False
)


class BuildUpstreamCompilerRtBuiltins(BuildCompilerRtBuiltins):
Expand Down
Loading
Loading