解决gcc15的编译问题
This commit is contained in:
@@ -21,7 +21,7 @@ kernel_version = "3.0.0"
|
||||
board_cpu = ""
|
||||
|
||||
# Board arch, e.g. "armv7-a", "rv32imac".
|
||||
board_arch = "rv32i"
|
||||
board_arch = "rv32imc_zicsr"
|
||||
|
||||
# Toolchain name used for system compiling.
|
||||
# E.g. gcc-arm-none-eabi, arm-linux-harmonyeabi-gcc, ohos-clang, riscv32-unknown-elf.
|
||||
@@ -57,7 +57,11 @@ board_cflags = [
|
||||
"-fno-short-enums",
|
||||
"-D__LITEOS__M",
|
||||
"-nostartfiles",
|
||||
"-mstrict-align"
|
||||
"-mstrict-align",
|
||||
"-Wno-error=incompatible-pointer-types",
|
||||
"-Wno-error=implicit-function-declaration",
|
||||
"-Wno-error=maybe-uninitialized",
|
||||
"-Wno-error=int-in-bool-context"
|
||||
]
|
||||
|
||||
board_cxx_flags = board_cflags
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "iot_gpio.h"
|
||||
#include "iot_errno_api.h"
|
||||
#include "iot_mtd.h"
|
||||
#include "iot_gpio_api.h"
|
||||
|
||||
|
||||
#include "read_flash.h"
|
||||
@@ -49,7 +50,7 @@ void LwipTestTimeoutCallback(void const *argument)
|
||||
iot_printf("TT\n");
|
||||
}
|
||||
|
||||
uint32_t g_lwipTestTimerId = NULL;
|
||||
uint32_t g_lwipTestTimerId = 0;
|
||||
void LwipTestStartTimer()
|
||||
{
|
||||
uint32_t status;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include "stdint.h"
|
||||
#include "read_flash.h"
|
||||
|
||||
|
||||
|
@@ -145,7 +145,7 @@ void os_heap_alloc_caps_init(unsigned int reserved_sz)
|
||||
g_reserved_part = os_mem_malloc(IOT_CLI_MID, reserved_sz);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t os_heap_alloc_get_reserved_part_info(uint32_t *addr)
|
||||
|
@@ -172,7 +172,7 @@ void os_set_task_prio_ext(os_task_h handle, uint8_t prio)
|
||||
|
||||
if (!ISVALID_LOS_PRIORITY(priority)) {
|
||||
/* unsupported priority */
|
||||
return NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
LOS_TaskPriSet((uint32_t)handle, priority);
|
||||
@@ -189,7 +189,7 @@ void os_set_task_prio(os_task_h handle, uint8_t prio)
|
||||
|
||||
if (!ISVALID_LOS_PRIORITY(priority)) {
|
||||
/* unsupported priority */
|
||||
return NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
LOS_TaskPriSet((uint32_t)handle, priority);
|
||||
|
@@ -140,7 +140,7 @@ void os_delete_timer(timer_id_t id)
|
||||
{
|
||||
SWTMR_CTRL_S *swtmr = (SWTMR_CTRL_S *)id;
|
||||
|
||||
os_mem_free(swtmr->uwArg);
|
||||
os_mem_free((void *)swtmr->uwArg);
|
||||
LOS_SwtmrDelete(swtmr->usTimerID);
|
||||
}
|
||||
|
||||
|
@@ -211,10 +211,10 @@ uint32_t IRAM_ATTR wdg_timeout_handler(uint32_t vector, iot_addrword_t data)
|
||||
uintptr_t mbadaddr = 0, mepc = 0, mcause = 0;
|
||||
mbadaddr = 0xdeadfeed;
|
||||
__asm volatile ( "csrc mstatus, 8" );
|
||||
__asm volatile ( "csrw mbadaddr, %0" :: "r"(mbadaddr) );
|
||||
__asm volatile ( "csrw mtval, %0" :: "r"(mbadaddr) );
|
||||
__asm volatile ( "csrr %0, mepc" : "=r"(mepc) );
|
||||
__asm volatile ( "csrr %0, mcause" : "=r"(mcause) );
|
||||
iot_sprintf(buf, "mcause: 0x%08x, mepc: 0x%08x, mbadaddr: 0x%08x\n",
|
||||
iot_sprintf(buf, "mcause: 0x%08x, mepc: 0x%08x, mtval: 0x%08x\n",
|
||||
mcause, mepc, mbadaddr);
|
||||
print_cache_error_msg(buf);
|
||||
iot_interrupt_mask(wdg->handle);
|
||||
|
@@ -469,7 +469,7 @@ void IRAM_ATTR exception_handler(uintptr_t mcause, uintptr_t epc, saved_register
|
||||
|
||||
//disble global interrupt;
|
||||
__asm volatile ( "csrc mstatus,8" );
|
||||
__asm volatile ( "csrr %0, mbadaddr" : "=r"(mbadaddr));
|
||||
__asm volatile ( "csrr %0, mtval" : "=r"(mbadaddr));
|
||||
|
||||
asm volatile ( "csrr %0, mcause" : "=r"(curr_mcause));
|
||||
asm volatile ( "csrr %0, mip" : "=r"(curr_mip));
|
||||
|
Reference in New Issue
Block a user