mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-06 03:29:17 +00:00
128 lines
5.7 KiB
INI
128 lines
5.7 KiB
INI
; The very slick RAK wireless RAK 4631 / 4630 board - Unified firmware for 5005/19003, with or without OLED RAK 1921
|
|
[env:meshlink]
|
|
extends = nrf52840_base
|
|
board = meshlink
|
|
;board_check = true
|
|
build_flags = ${nrf52840_base.build_flags} -I variants/meshlink -D MESHLINK
|
|
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
|
|
-D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
|
-D EINK_DISPLAY_MODEL=GxEPD2_213_B74
|
|
-D EINK_WIDTH=250
|
|
-D EINK_HEIGHT=122
|
|
-D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
|
-D EINK_LIMIT_FASTREFRESH=5 ; How many consecutive fast-refreshes are permitted
|
|
-D EINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates
|
|
-D EINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates
|
|
-D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated
|
|
-D EINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
|
-D EINK_HASQUIRK_VICIOUSFASTREFRESH ; Identify that pixels drawn by fast-refresh are harder to clear
|
|
|
|
|
|
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/meshlink>
|
|
lib_deps =
|
|
${nrf52840_base.lib_deps}
|
|
https://github.com/meshtastic/GxEPD2#55f618961db45a23eff0233546430f1e5a80f63a
|
|
melopero/Melopero RV3028@^1.1.0
|
|
rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2
|
|
beegee-tokyo/RAKwireless RAK12034@^1.0.0
|
|
debug_tool = jlink
|
|
|
|
|
|
|
|
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
|
|
; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds
|
|
;upload_protocol = jlink
|
|
|
|
; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!)
|
|
; programming time is about the same as the bootloader version.
|
|
; For information on this see the meshtastic developers documentation for "Development on the NRF52"
|
|
[env:meshlink_dbg]
|
|
extends = env:meshlink
|
|
board_level = extra
|
|
|
|
; if the builtin version of openocd has a buggy version of semihosting, so use the external version
|
|
; platform_packages = platformio/tool-openocd@^3.1200.0
|
|
|
|
build_flags =
|
|
${env:meshlink.build_flags}
|
|
-D USE_SEMIHOSTING
|
|
|
|
lib_deps =
|
|
${env:meshlink.lib_deps}
|
|
https://github.com/geeksville/Armduino-Semihosting.git#35b538fdf208c3530c1434cd099a08e486672ee4
|
|
|
|
; NOTE: the pyocd support for semihosting is buggy. So I switched to using the builtin platformio support for the stlink adapter which worked much better.
|
|
; However the built in openocd version in platformio has buggy support for TCP to semihosting.
|
|
;
|
|
; So I'm now trying the external openocd - but the openocd scripts for nrf52.cfg assume you are using a DAP adapter not an STLINK adapter.
|
|
; In theory I could change those scripts. But for now I'm trying going back to a DAP adapter but with the external openocd.
|
|
|
|
upload_protocol = stlink
|
|
; eventually use platformio/tool-pyocd@^2.3600.0 instad
|
|
;upload_protocol = custom
|
|
;upload_command = pyocd flash -t nrf52840 $UPLOADERFLAGS $SOURCE
|
|
|
|
; We want the initial breakpoint at setup() instead of main(). Also we want to enable semihosting at that point so instead of
|
|
; debug_init_break = tbreak setup
|
|
; we just turn off the platformio tbreak and do it in .gdbinit (where we have more flexibility for scripting)
|
|
; also we use a permanent breakpoint so it gets reused each time we restart the debugging session?
|
|
debug_init_break = tbreak setup
|
|
|
|
; Note: add "monitor arm semihosting_redirect tcp 4444 all" if you want the stdout from the device to go to that port number instead
|
|
; (for use by meshtastic command line)
|
|
; monitor arm semihosting disable
|
|
; monitor debug_level 3
|
|
;
|
|
; IMPORTANT: fileio must be disabled before using port 5555 - openocd ver 0.12 has a bug where if enabled it never properly parses the special :tt name
|
|
; for stdio access.
|
|
; monitor arm semihosting_redirect tcp 5555 stdio
|
|
|
|
; Also note: it is _impossible_ to do non blocking reads on the semihost console port (an oversight when ARM specified the semihost API).
|
|
; So we'll neve be able to general purpose bi-directional communication with the device over semihosting.
|
|
debug_extra_cmds =
|
|
echo Running .gdbinit script
|
|
monitor arm semihosting enable
|
|
monitor arm semihosting_fileio enable
|
|
monitor arm semihosting_redirect disable
|
|
commands 1
|
|
echo Breakpoint at setup() has semihosting console, connect to it with "telnet localhost 5555"
|
|
set wantSemihost = true
|
|
set useSoftDevice = false
|
|
end
|
|
|
|
|
|
; Only reprogram the board if the code has changed
|
|
debug_load_mode = modified
|
|
;debug_load_mode = manual
|
|
debug_tool = stlink
|
|
;debug_tool = custom
|
|
; debug_server =
|
|
; openocd
|
|
; -f
|
|
; /usr/local/share/openocd/scripts/interface/stlink.cfg
|
|
; -f
|
|
; /usr/local/share/openocd/scripts/target/nrf52.cfg
|
|
; $PLATFORMIO_CORE_DIR/packages/tool-openocd/openocd/scripts/interface/cmsis-dap.cfg
|
|
|
|
; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!)
|
|
; programming time is about the same as the bootloader version.
|
|
; For information on this see the meshtastic developers documentation for "Development on the NRF52"
|
|
; We manually pass in the elf file so that pyocd can reverse engineer FreeRTOS data (running threads, etc...)
|
|
;debug_server =
|
|
; pyocd
|
|
; gdbserver
|
|
; -j
|
|
; ${platformio.workspace_dir}/..
|
|
; -t
|
|
; nrf52840
|
|
; --semihosting
|
|
; --elf
|
|
; ${platformio.build_dir}/${this.__env__}/firmware.elf
|
|
|
|
; If you want to debug the semihosting support you can turn on extra logging in pyocd with
|
|
; -L
|
|
; pyocd.debug.semihost.trace=debug
|
|
|
|
; The following is not needed because it automatically tries do this
|
|
;debug_server_ready_pattern = -.*GDB server started on port \d+.*
|
|
;debug_port = localhost:3333 |