mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-09 05:05:17 -05:00
* Add Makefile project for RISC-V QEMU virtpc
This patch adds simple demo directory for QEMU virtpc machine.
A demo just prints Tx/Rx message of queue to serial port, use no
other hardware and use only primary core (currently hart0).
Other cores are simply going to wfi state and execute nothing else.
Example command is:
qemu-system-riscv32 -nographic -machine virt -net none \
-chardev stdio,id=con,mux=on -serial chardev:con \
-mon chardev=con,mode=readline -bios none \
-kernel demo.elf -smp cpus=2 -s
* Fix copyright and URLS of FreeRTOS
* Fix Makefile
* Add Readme.md
* Separate blinky demo from main code
Co-authored-by: alfred gedeon <alfred2g@hotmail.com>
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
Co-authored-by: Carl Lundin <53273776+lundinc2@users.noreply.github.com>
117 lines
1.6 KiB
Text
117 lines
1.6 KiB
Text
OUTPUT_ARCH( "riscv" )
|
|
ENTRY( _start )
|
|
|
|
MEMORY
|
|
{
|
|
/* Fake ROM area */
|
|
rom (rxa) : ORIGIN = 0x80000000, LENGTH = 512K
|
|
ram (wxa) : ORIGIN = 0x80080000, LENGTH = 512K
|
|
}
|
|
|
|
SECTIONS
|
|
{
|
|
.init :
|
|
{
|
|
_text = .;
|
|
KEEP (*(SORT_NONE(.init)))
|
|
} >rom AT>rom
|
|
|
|
.text :
|
|
{
|
|
*(.text.unlikely .text.unlikely.*)
|
|
*(.text.startup .text.startup.*)
|
|
*(.text .text.*)
|
|
*(.gnu.linkonce.t.*)
|
|
} >rom AT>rom
|
|
|
|
.fini :
|
|
{
|
|
KEEP (*(SORT_NONE(.fini)))
|
|
_etext = .;
|
|
} >rom AT>rom
|
|
|
|
.rodata.align :
|
|
{
|
|
. = ALIGN(4);
|
|
_rodata = .;
|
|
} >rom AT>rom
|
|
|
|
.rodata.start :
|
|
{
|
|
_rodata_lma = LOADADDR(.rodata.start);
|
|
} >rom AT>rom
|
|
|
|
.rodata :
|
|
{
|
|
*(.rdata)
|
|
*(.rodata .rodata.*)
|
|
*(.gnu.linkonce.r.*)
|
|
|
|
. = ALIGN(4);
|
|
_erodata = .;
|
|
} >rom AT>rom
|
|
|
|
.data.align :
|
|
{
|
|
. = ALIGN(4);
|
|
_data = .;
|
|
} >ram AT>rom
|
|
|
|
.data.start :
|
|
{
|
|
_data_lma = LOADADDR(.data.start);
|
|
} >ram AT>rom
|
|
|
|
.data :
|
|
{
|
|
*(.data .data.*)
|
|
*(.gnu.linkonce.d.*)
|
|
. = ALIGN(8);
|
|
PROVIDE( __global_pointer$ = . + 0x800 );
|
|
*(.sdata .sdata.*)
|
|
*(.sdata2 .sdata2.*)
|
|
*(.gnu.linkonce.s.*)
|
|
. = ALIGN(8);
|
|
*(.srodata.cst16)
|
|
*(.srodata.cst8)
|
|
*(.srodata.cst4)
|
|
*(.srodata.cst2)
|
|
*(.srodata .srodata.*)
|
|
|
|
. = ALIGN(4);
|
|
_edata = .;
|
|
} >ram AT>rom
|
|
|
|
.bss.align :
|
|
{
|
|
. = ALIGN(4);
|
|
_bss = .;
|
|
} >ram AT>rom
|
|
|
|
.bss.start :
|
|
{
|
|
_bss_lma = LOADADDR(.bss.start);
|
|
} >ram AT>rom
|
|
|
|
.bss :
|
|
{
|
|
*(.sbss*)
|
|
*(.gnu.linkonce.sb.*)
|
|
*(.bss .bss.*)
|
|
*(.gnu.linkonce.b.*)
|
|
*(COMMON)
|
|
|
|
. = ALIGN(4);
|
|
_ebss = .;
|
|
} >ram AT>rom
|
|
|
|
. = ALIGN(8);
|
|
_end = .;
|
|
|
|
.stack :
|
|
{
|
|
. = ALIGN(16);
|
|
. += __stack_size;
|
|
_stack_top = .;
|
|
} >ram AT>ram
|
|
}
|