Skip to content

esp8266: can't build with MICROPY_PY_USSL = 0 or MICROPY_SSL_AXTLS = 0 #2475

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

Closed
deshipu opened this issue Oct 4, 2016 · 3 comments
Closed

Comments

@deshipu
Copy link
Contributor

deshipu commented Oct 4, 2016

Setting either (or both) of those flags to 0 results in:

LINK build/firmware.elf
build/py/../extmod/moduhashlib.o:(.text.sha1_update+0x0): undefined reference to `SHA1_Update'
build/py/../extmod/moduhashlib.o: In function `sha1_update':
moduhashlib.c:(.text.sha1_update+0x1f): undefined reference to `SHA1_Update'
build/py/../extmod/moduhashlib.o:(.text.sha1_digest+0x0): undefined reference to `SHA1_Final'
build/py/../extmod/moduhashlib.o: In function `sha1_digest':
moduhashlib.c:(.text.sha1_digest+0x1a): undefined reference to `SHA1_Final'
build/py/../extmod/moduhashlib.o:(.text.sha1_make_new+0x0): undefined reference to `SHA1_Init'
build/py/../extmod/moduhashlib.o: In function `sha1_make_new':
moduhashlib.c:(.text.sha1_make_new+0x32): undefined reference to `SHA1_Init'
Makefile:204: recipe for target 'build/firmware.elf' failed
make: *** [build/firmware.elf] Error 1
@hosaka
Copy link
Contributor

hosaka commented Oct 4, 2016

moduhashlib depends on the axtls SHA1 crypt, disabling MICROPY_PY_UHASHLIB_SHA1 fixes the compilation. In unix mpconfigport.h we have

#if MICROPY_PY_USSL && MICROPY_SSL_AXTLS
#define MICROPY_PY_UHASHLIB_SHA1    (1)
#endif

Perhaps a similar #if is needed in esp8266/mpconfigport.h

@hosaka
Copy link
Contributor

hosaka commented Oct 5, 2016

Should I add a patch for this?

@dpgeorge
Copy link
Member

dpgeorge commented Oct 6, 2016

Fixed in 056da75. ussl and axtls take about 21k of code space.

@dpgeorge dpgeorge closed this as completed Oct 6, 2016
tannewt added a commit to tannewt/circuitpython that referenced this issue Jan 18, 2020
Introduces a way to place CircuitPython code and data into
tightly coupled memory (TCM) which is accessible by the CPU in a
single cycle. It also frees up room in the corresponding cache for
intermittent data. Loading from external flash is slow!

The data cache is also now enabled.

Adds support for the iMX RT 1021 chip. Adds three new boards:
* iMX RT 1020 EVK
* iMX RT 1060 EVK
* Teensy 4.0

Related to micropython#2492, micropython#2472 and micropython#2477. Fixes micropython#2475.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants