修复mcu无法编译的问题

This commit is contained in:
zhangzheng
2024-07-31 23:27:19 +08:00
parent 751a6c0c77
commit 5af20bcdd7
36 changed files with 187 additions and 86 deletions

View File

@@ -109,7 +109,7 @@ int sram_test(void)
//! 内核镜像的开始地址
#define KERNEL_IMG_START_ADDR (CONFIG_KNL_TEXT_ADDR + CONFIG_KNL_OFFSET)
void jump2kernel(void)
void jump2kernel(addr_t cpio_start, addr_t cpio_end)
{
SystemInit();
uart_init();

View File

@@ -19,6 +19,11 @@ SECTIONS
*(.text)
*(.text*)
*(.rodata*)
. = ALIGN(4);
cpio_start = .;
*(.cpio*)
. = ALIGN(4096);
cpio_end = .;
} > ROM
. = ALIGN(4);
@@ -67,5 +72,4 @@ SECTIONS
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
assert(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
}

View File

@@ -1,8 +1,9 @@
#ifndef __SYS_H
#define __SYS_H
#endif
#include <SWM341.h>
void jump2kernel(void);
void jump2kernel(addr_t cpio_start, addr_t cpio_end);
#endif