Skip to content

Commit

Permalink
Fix Curio build after 'USB_CDC' build addition
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Oct 16, 2024
1 parent ae11e0e commit 70e8f9e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README_BuildProcess.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ This is a partial list of definitions that can be added in a `BOARD.py` file's `
* `ESPR_PBF_FONTS` - Enable support for loading and displaying Pebble-style PBF font files with `g.setFontPBF`
* `ESPR_BLUETOOTH_ANCS` - Enable Apple ANCS(notification), AMS and CTS support
* `ESPR_USE_STEPPER_TIMER` - add builtin `Stepper` class to handle higher speed stepper handling
* `USB_CDC` - without this on ESP32C3, USB CDC will not be used for outputting the console


There are some specifically that are useful for cutting a few bytes out of the build:

Expand Down
15 changes: 8 additions & 7 deletions boards/CURIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# A Note about the 'variables' parameter on ESP32 Builds
# ------------------------------------------------------
#
#
# For the ESP32 build, the number of JsVars is governed by two factors:
# * Available memory
# * Maximum number of JsVars for the used JsVar format
Expand Down Expand Up @@ -52,7 +52,7 @@
'espruino_page_link' : 'Curio',
'default_console' : "EV_SERIAL1",
'default_console_baudrate' : "115200",
'variables' : 16383, # See note above
'variables' : 16383, # See note above
'io_buffer_size' : 1024, # How big is the input buffer (in 4 byte words). Default is 256, but this makes us less likely to drop data
'binary_name' : 'espruino_%v_curio.bin',
'build' : {
Expand All @@ -67,17 +67,18 @@
# 'FILESYSTEM',
# 'FLASHFS',
'BLUETOOTH',
'NEOPIXEL'
'NEOPIXEL'
],
'makefile' : [
'DEFINES+=-DESP_PLATFORM -DESP32=1',
'DEFINES+=-DESP_STACK_SIZE=25000',
'DEFINES+=-DJSVAR_MALLOC', # Allocate space for variables at jsvInit time
'DEFINES+=-DUSE_FONT_6X8',
'DEFINES+=-DUSB_CDC', # Because now we have to explicitly request it
'ESP32_FLASH_MAX=1572864',
# 'DEFINES+=-DBLUETOOTH_NAME_PREFIX=\'\"Curio\"\'', # string passing in IDF4 makefile is broken
'INCLUDE += -I$(ROOT)/libs/misc',
'WRAPPERSOURCES += libs/misc/jswrap_curio.c',
'WRAPPERSOURCES += libs/misc/jswrap_curio.c',
'WRAPPERSOURCES += libs/joltjs/jswrap_qwiic.c',
]
}
Expand Down Expand Up @@ -156,13 +157,13 @@ def get_pins():
pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN2"]=0;
pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN3"]=0;
pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN4"]=0;
# pinutils.findpin(pins, "PD5", True)["functions"]["ADC2_IN0"]=0;
# pinutils.findpin(pins, "PD5", True)["functions"]["ADC2_IN0"]=0;
# pinutils.findpin(pins, "PD8", True)["functions"]["NEGATED"]=0; # LED negated - but ESP32 port ignores negation
# D12-D17 are SPI (internal SPI) - not sure they should even be exposed??

#18/19 are USB
pinutils.findpin(pins, "PD20", True)["functions"]["USART0_RX"]=0;
pinutils.findpin(pins, "PD21", True)["functions"]["USART0_TX"]=0;
pinutils.findpin(pins, "PD21", True)["functions"]["USART0_TX"]=0;

# everything is non-5v tolerant
for pin in pins:
Expand Down

0 comments on commit 70e8f9e

Please sign in to comment.