File tree Expand file tree Collapse file tree 4 files changed +53
-0
lines changed Expand file tree Collapse file tree 4 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ project(debugprobe)
1010pico_sdk_init()
1111
1212add_executable (debugprobe
13+ src/probe_config.c
1314 src/led.c
1415 src/main.c
1516 src/usb_descriptors.c
Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ void usb_thread(void *ptr)
8080#endif
8181
8282int main (void ) {
83+ // Declare pins in binary information
84+ bi_decl_config ();
8385
8486 board_init ();
8587 usb_serial_init ();
Original file line number Diff line number Diff line change 1+ #include "probe_config.h"
2+ #include "pico/binary_info.h"
3+
4+
5+ #define STR_HELPER (x ) #x
6+ #define STR (x ) STR_HELPER(x)
7+
8+
9+ void bi_decl_config ()
10+ {
11+ #ifdef PROBE_PIN_RESET
12+ bi_decl (bi_1pin_with_name (PROBE_PIN_RESET , "PROBE RESET" ));
13+ #endif
14+
15+ #ifdef PROBE_PIN_SWCLK
16+ bi_decl (bi_1pin_with_name (PROBE_PIN_SWCLK , "PROBE SWCLK" ));
17+ #endif
18+
19+ #ifdef PROBE_PIN_SWDIO
20+ bi_decl (bi_1pin_with_name (PROBE_PIN_SWDIO , "PROBE SWDIO" ));
21+ #endif
22+
23+ #ifdef PROBE_PIN_SWDI
24+ bi_decl (bi_1pin_with_name (PROBE_PIN_SWDI , "PROBE SWDI" ));
25+ #endif
26+
27+ #ifdef PROBE_PIN_SWDIOEN
28+ bi_decl (bi_1pin_with_name (PROBE_PIN_SWDIOEN , "PROBE SWDIOEN" ));
29+ #endif
30+
31+ #ifdef PROBE_CDC_UART
32+ bi_decl (bi_program_feature ("PROBE UART INTERFACE " STR (PROBE_UART_INTERFACE )));
33+ bi_decl (bi_program_feature ("PROBE UART BAUDRATE " STR (PROBE_UART_BAUDRATE )));
34+ bi_decl (bi_1pin_with_name (PROBE_UART_TX , "PROBE UART TX" ));
35+ bi_decl (bi_1pin_with_name (PROBE_UART_RX , "PROBE UART RX" ));
36+ #endif
37+
38+ #ifdef PROBE_UART_CTS
39+ bi_decl (bi_1pin_with_name (PROBE_UART_CTS , "PROBE UART CTS" ));
40+ #endif
41+ #ifdef PROBE_UART_RTS
42+ bi_decl (bi_1pin_with_name (PROBE_UART_RTS , "PROBE UART RTS" ));
43+ #endif
44+ #ifdef PROBE_UART_DTR
45+ bi_decl (bi_1pin_with_name (PROBE_UART_DTR , "PROBE UART DTR" ));
46+ #endif
47+
48+ }
Original file line number Diff line number Diff line change 7272#endif
7373//#include "board_example_config.h"
7474
75+ // Add the configuration to binary information
76+ void bi_decl_config ();
7577
7678#define PROTO_DAP_V1 1
7779#define PROTO_DAP_V2 2
You can’t perform that action at this time.
0 commit comments