Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add legacy mode for third parties (flashrom, avrdude & asprogrammer dreg mod) #81

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ if(WIN32)
else()
set(USERHOME $ENV{HOME})
endif()
set(PICO_SDK_PATH ${USERHOME}/.pico-sdk/sdk/2.0.0)
set(PICO_TOOLCHAIN_PATH ${USERHOME}/.pico-sdk/toolchain/13_2_Rel1)
set(pioasm_HINT ${USERHOME}/.pico-sdk/tools/2.0.0/pioasm)
if(EXISTS ${pioasm_HINT})
set(pioasm_DIR ${pioasm_HINT})
endif()
set(picotool_HINT ${USERHOME}/.pico-sdk/picotool/2.0.0/picotool)
if(EXISTS ${picotool_HINT})
set(picotool_DIR ${picotool_HINT})
endif()
if(PICO_TOOLCHAIN_PATH MATCHES "RISCV")
set(PICO_PLATFORM rp2350-riscv CACHE STRING "Pico Platform")
if(PICO_TOOLCHAIN_PATH MATCHES "COREV")
set(PICO_COMPILER pico_riscv_gcc_zcb_zcmp)
endif()
endif()
# ====================================================================================
# == DO NEVER EDIT THE NEXT LINES for Raspberry Pi Pico VS Code Extension to work ==
if(WIN32)
set(USERHOME $ENV{USERPROFILE})
else()
set(USERHOME $ENV{HOME})
endif()
if(WIN32)
set(sdkVersion 2.0.0)
set(toolchainVersion 13_2_Rel1)
Expand Down Expand Up @@ -200,6 +223,7 @@ set(bp5_common
mode/binloopback.c mode/binloopback.h
binmode/logicanalyzer.h binmode/logicanalyzer.c binmode/sump.c binmode/sump.h
binmode/dirtyproto.c binmode/dirtyproto.h
binmode/legacy4third.c binmode/legacy4third.h
lib/arduino-ch32v003-swio/arduino_ch32v003.c lib/arduino-ch32v003-swio/arduino_ch32v003.h
lib/arduino-ch32v003-swio/swio.h lib/arduino-ch32v003-swio/swio.c
lib/picorvd/picoswio.c lib/picorvd/picoswio.h lib/picorvd/debug_defines.h
Expand Down
8 changes: 8 additions & 0 deletions binmode/binmodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "system_config.h"
#include "binmode/sump.h"
#include "binmode/dirtyproto.h"
#include "binmode/legacy4third.h"
#include "binmode/falaio.h"
#include "lib/arduino-ch32v003-swio/arduino_ch32v003.h"

Expand Down Expand Up @@ -43,6 +44,13 @@ const binmode_t binmodes[] = {
.binmode_service = falaio_service,
.binmode_cleanup = falaio_cleanup,
},
{
.lock_terminal = true,
.binmode_name = legacy4third_mode_name,
.binmode_setup = binmode_null_func_void,
.binmode_service = legacy4third_mode,
.binmode_cleanup = binmode_null_func_void,
},
};

inline void binmode_setup(void){
Expand Down
1 change: 1 addition & 0 deletions binmode/binmodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ enum {
BINMODE_USE_SUMPLA=0,
BINMODE_USE_DIRTYPROTO,
BINMODE_USE_ARDUINO_CH32V003_SWIO,
BINMODE_USE_LEGACY4THIRD,
BINMODE_USE_FALA,
BINMODE_MAXPROTO
};
Expand Down
Loading