Forked from
card10 / firmware
1434 commits behind the upstream repository.
-
- Implement de-initialization - Wrap filesystem operations in semaphore - Introduce EpicFileSystem object and move epic_file_FOO(...) imlementations into efs_FOO(EpicFileSystem*, ...) functions. - epic_file_FOO(...) functions are now wrappers around the _fs_ functions, but lock and unlock the global filesystem object before & after calls. This way, all efs_ functions can assume that the necessary lock has been acquired. - libff: don't use FF_FS_REENTRANT, our own FS lock is enough
- Implement de-initialization - Wrap filesystem operations in semaphore - Introduce EpicFileSystem object and move epic_file_FOO(...) imlementations into efs_FOO(EpicFileSystem*, ...) functions. - epic_file_FOO(...) functions are now wrappers around the _fs_ functions, but lock and unlock the global filesystem object before & after calls. This way, all efs_ functions can assume that the necessary lock has been acquired. - libff: don't use FF_FS_REENTRANT, our own FS lock is enough
meson.build 2.12 KiB
name = 'epicardium'
##########################################################################
#
# API
#
##########################################################################
api = custom_target(
'api_*.c',
input: 'epicardium.h',
output: ['api_caller.c', 'api_dispatcher.c'],
command: [
python3,
meson.current_source_dir() + '/api/genapi.py',
'-H', '@INPUT0@',
'-c', '@OUTPUT0@', '-s', '@OUTPUT1@',
],
depend_files: 'api/genapi.py',
)
api_caller_lib = static_library(
'api-caller',
'api/caller.c',
'api/interrupt-receiver.c',
api[0], # Caller
dependencies: periphdriver,
)
api_caller = declare_dependency(
include_directories: include_directories('.'),
link_with: api_caller_lib,
dependencies: periphdriver,
)
api_dispatcher_lib = static_library(
'api-dispatcher',
'api/dispatcher.c',
'api/interrupt-sender.c',
api[1], # Dispatcher
dependencies: periphdriver,
)
##########################################################################
#
# FreeRTOS
#
##########################################################################
freertos = static_library(
'freertos',
freertos_sources,
freertos_heap3,
dependencies: periphdriver,
include_directories: [
freertos_includes,
include_directories('./'),
],
)
##########################################################################
#
# Epicardium executable
#
##########################################################################
subdir('modules/')
subdir('ble/')
subdir('l0der/')
elf = executable(
name + '.elf',
'cdcacm.c',
'main.c',
'support.c',
'fs/filesystem_fat.c',
module_sources,
l0der_sources,
ble_sources,
dependencies: [libcard10, max32665_startup_core0, maxusb, libff13, ble],
link_with: [api_dispatcher_lib, freertos],
link_whole: [max32665_startup_core0_lib, board_card10_lib, newlib_heap_lib],
include_directories: [freertos_includes],
link_args: [
'-Wl,-Map=' + meson.current_build_dir() + '/' + name + '.map',
],
)
epicardium_bin = custom_target(
name + '.bin',
build_by_default: true,
output: name + '.bin',
input: elf,
command: [build_image, '@INPUT@', '@OUTPUT0@'],
)