Verified Commit 32144f97 authored by Rahix's avatar Rahix
Browse files

feat(epicardium): Add switch for core 1 debugging



Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent 1067d234
......@@ -68,6 +68,8 @@ firmware features:
- ``-Ddebug_prints=true``: Print more verbose debugging log messages
- ``-Dble_trace=true``: Enable BLE tracing. This will output lots of status
info related to BLE.
- ``-Ddebug_core1=true``: Enable the core 1 SWD lines which are exposed on the
SAO connector. Only use this if you have a debugger which is modified for core 1.
.. warning::
......
......@@ -6,6 +6,7 @@
#include "max32665.h"
#include "uart.h"
#include "cdcacm.h"
#include "gpio.h"
#include "card10.h"
#include "pmic.h"
......@@ -51,7 +52,24 @@ int main(void)
LOG_INFO("startup", "Version " CARD10_VERSION);
card10_init();
card10_diag();
#ifdef CARD10_DEBUG_CORE1
LOG_WARN("startup", "Core 1 Debugger Mode");
static const gpio_cfg_t swclk = {
PORT_0,
PIN_7,
GPIO_FUNC_ALT3,
GPIO_PAD_NONE,
};
static const gpio_cfg_t swdio = {
PORT_0,
PIN_6,
GPIO_FUNC_ALT3,
GPIO_PAD_NONE,
};
GPIO_Config(&swclk);
GPIO_Config(&swdio);
#endif /* CARD10_DEBUG_CORE1 */
gfx_copy_region_raw(
&display_screen, 0, 0, 160, 80, 2, (const void *)(Heart)
......
......@@ -28,6 +28,13 @@ if get_option('debug_prints')
)
endif
if get_option('debug_core1')
add_global_arguments(
['-DCARD10_DEBUG_CORE1=1'],
language: 'c',
)
endif
add_global_link_arguments(
'-Wl,--gc-sections',
'-lm',
......
......@@ -6,6 +6,14 @@ option(
description: 'Whether to print debug messages on the serial console'
)
option(
'debug_core1',
type: 'boolean',
value: false,
description: 'Enable core 1 debugging interface'
)
option(
'ble_trace',
type: 'boolean',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment