Skip to content
Snippets Groups Projects
Commit 06371344 authored by rahix's avatar rahix Committed by schneider
Browse files

feat(epicardium): Add switch for core 1 debugging


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 8944f800
No related branches found
No related tags found
1 merge request!96Changes for the Cycle of Life [MANUAL MERGE]
...@@ -68,6 +68,8 @@ firmware features: ...@@ -68,6 +68,8 @@ firmware features:
- ``-Ddebug_prints=true``: Print more verbose debugging log messages - ``-Ddebug_prints=true``: Print more verbose debugging log messages
- ``-Dble_trace=true``: Enable BLE tracing. This will output lots of status - ``-Dble_trace=true``: Enable BLE tracing. This will output lots of status
info related to BLE. 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:: .. warning::
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "max32665.h" #include "max32665.h"
#include "uart.h" #include "uart.h"
#include "cdcacm.h" #include "cdcacm.h"
#include "gpio.h"
#include "card10.h" #include "card10.h"
#include "pmic.h" #include "pmic.h"
...@@ -51,7 +52,24 @@ int main(void) ...@@ -51,7 +52,24 @@ int main(void)
LOG_INFO("startup", "Version " CARD10_VERSION); LOG_INFO("startup", "Version " CARD10_VERSION);
card10_init(); 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( gfx_copy_region_raw(
&display_screen, 0, 0, 160, 80, 2, (const void *)(Heart) &display_screen, 0, 0, 160, 80, 2, (const void *)(Heart)
......
...@@ -28,6 +28,13 @@ if get_option('debug_prints') ...@@ -28,6 +28,13 @@ if get_option('debug_prints')
) )
endif endif
if get_option('debug_core1')
add_global_arguments(
['-DCARD10_DEBUG_CORE1=1'],
language: 'c',
)
endif
add_global_link_arguments( add_global_link_arguments(
'-Wl,--gc-sections', '-Wl,--gc-sections',
'-lm', '-lm',
......
...@@ -6,6 +6,14 @@ option( ...@@ -6,6 +6,14 @@ option(
description: 'Whether to print debug messages on the serial console' description: 'Whether to print debug messages on the serial console'
) )
option(
'debug_core1',
type: 'boolean',
value: false,
description: 'Enable core 1 debugging interface'
)
option( option(
'ble_trace', 'ble_trace',
type: 'boolean', type: 'boolean',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment