soc: Add support for the WCH CH32V303
Adds support for building an image for the ch32v303. Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
This commit is contained in:
parent
2b91c467f2
commit
be9549be60
15 changed files with 444 additions and 1 deletions
32
soc/wch/ch32v/qingke_v4f/vector.S
Normal file
32
soc/wch/ch32v/qingke_v4f/vector.S
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Michael Hope
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/toolchain.h>
|
||||
|
||||
#ifndef CONFIG_VECTOR_TABLE_SIZE
|
||||
#error "VECTOR_TABLE_SIZE must be defined"
|
||||
#endif
|
||||
|
||||
/* Exports */
|
||||
GTEXT(__start)
|
||||
|
||||
/* Imports */
|
||||
GTEXT(__initialize)
|
||||
|
||||
SECTION_FUNC(vectors, ivt)
|
||||
.option norvc
|
||||
/* Jump to 0x08000008, into the main flash zone where j __start is */
|
||||
lui x5, 0x8000
|
||||
jr 0x8(x5)
|
||||
j __start
|
||||
.rept CONFIG_VECTOR_TABLE_SIZE
|
||||
.word _isr_wrapper
|
||||
.endr
|
||||
|
||||
SECTION_FUNC(vectors, __start)
|
||||
li a0, 0xf
|
||||
csrw mtvec, a0
|
||||
j __initialize
|
Loading…
Add table
Add a link
Reference in a new issue