|
|
|
@ -9,14 +9,12 @@ ch32v10x_proj = subproject('ch32v10x')
|
|
|
|
|
ch32v10x_dep = ch32v10x_proj.get_variable('ch32v10x_dep')
|
|
|
|
|
ch32v10x_sys_dep = ch32v10x_proj.get_variable('ch32v10x_sys_dep')
|
|
|
|
|
dependencies = [ch32v10x_dep, ch32v10x_sys_dep]
|
|
|
|
|
linker_script = 'subprojects/ch32v10x/Ld/Link.ld'
|
|
|
|
|
|
|
|
|
|
## END USER MUST MODIFY: KEEP ONLY THE 10x or 30x BLOCK
|
|
|
|
|
ch32v30x_proj = subproject('ch32v30x', default_options: ['variant=CH32V307'])
|
|
|
|
|
ch32v30x_dep = ch32v30x_proj.get_variable('ch32v30x_dep')
|
|
|
|
|
ch32v30x_sys_dep = ch32v30x_proj.get_variable('ch32v30x_sys_dep')
|
|
|
|
|
dependencies = [ch32v30x_dep, ch32v30x_sys_dep]
|
|
|
|
|
linker_script = 'subprojects/ch32v30x/Ld/Link.ld'
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
'src/main.c',
|
|
|
|
@ -28,23 +26,6 @@ includes = [
|
|
|
|
|
|
|
|
|
|
_incl_dirs = include_directories(includes)
|
|
|
|
|
|
|
|
|
|
if linker_script != ''
|
|
|
|
|
fn = meson.source_root() / linker_script
|
|
|
|
|
add_project_link_arguments('-T' + fn, language: ['c', 'cpp'])
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
add_project_arguments(
|
|
|
|
|
'-ffunction-sections',
|
|
|
|
|
'-fdata-sections',
|
|
|
|
|
'-ggdb3',
|
|
|
|
|
language: ['c', 'cpp']
|
|
|
|
|
)
|
|
|
|
|
add_project_link_arguments(
|
|
|
|
|
'-Wl,-gc-sections',
|
|
|
|
|
'-nostartfiles',
|
|
|
|
|
language: ['c', 'cpp']
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
objcopy = find_program('objcopy')
|
|
|
|
|
objdump = find_program('objdump')
|
|
|
|
|
size = find_program('size')
|
|
|
|
|