Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NRF52 build does not start REPL #809

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
jerryneedell opened this issue May 7, 2018 · 10 comments
Closed

NRF52 build does not start REPL #809

jerryneedell opened this issue May 7, 2018 · 10 comments

Comments

@jerryneedell
Copy link
Collaborator

jerryneedell commented May 7, 2018

I just built the current master for the feather52 (nrf52)
It builds within errors and I am able to flash it to the board with no issues, but I cannot access the REPL as I usually do via /dev/ttyUSB0 -- my screen session connects, but there is no response/
I also tried accessing the board via ampy, but it just hangs - no response.

@jerryneedell
Copy link
Collaborator Author

jerryneedell commented May 7, 2018

It works normally if I revert to CP 3.0.0-alpha.6

It also works normally if I just remove PR #804

@jerryneedell
Copy link
Collaborator Author

jerryneedell commented May 7, 2018

looking at main.py I see that now the FS is write protected to python for all builds:
https://github.com/adafruit/circuitpython/blob/master/main.c#L330

Is that intended. When I revert #804 I am able to write to the FS from within python. For example:

import os
os.rename('foo.py','bar.py')

works

for the non atmel-boards (nrf52, esp8266) should the FS be write inhibited?
Is this part of the problem here?

ah - simple workaround
removing

#define CIRCUITPY_BOOT_OUTPUT_FILE "/boot_out.txt"

from mpconfigport.h fixes the problem for the nrf52. It now enters the REPL as expected with the current master.

@jerryneedell
Copy link
Collaborator Author

This issue is still present after #811.
No response from REPL in terminal session or via ampy.

I can still make it work by removing the define for CIRCUITPY_BOOT_OUTPUT_FILE in mpconfigport.h

@jerryneedell
Copy link
Collaborator Author

FYI - I noted that the ESP8266 mpconfigport.h does not define CIRCUITPY_BOOT_OUTPUT_FILE and it continues to function normally. Is it intentional that it not be defined and boot_out.txt not be created for the ESP8266? Should it also be this way for the nrf52?

@tannewt
Copy link
Member

tannewt commented May 7, 2018

The nrf52 build should model itself after the SAMD port. The ESP8266 version isn't using the shared supervisor code yet.

@microbuilder
Copy link

Just saw this (no email, not sure why, sorry) ... I'll see if I can reproduce.

@jerryneedell
Copy link
Collaborator Author

jerryneedell commented May 14, 2018

@microbuilder #813 provides a workaround - It has been merged in to master so the nrf52 does boot to REPL now -- the long term fix is still in progress.

hathach added a commit to microbuilder/circuitpython that referenced this issue May 15, 2018
define CIRCUITPY_BOOT_OUTPUT_FILE will cause mp_hal_stdout_tx_strn() to
invoke before serial_init() is called. Solution is skipped output to
serial if it is not inited.
@hathach
Copy link
Member

hathach commented May 15, 2018

the issue is caused by the mp_hal_stdout_tx_str() is called before serial_init() is invoked due to CIRCUITPYTHON_BOOT_OUTPUT_FILE. The fix is skip output to serial if it is not inited.

microbuilder@53593d1

@tannewt
Copy link
Member

tannewt commented May 16, 2018

@hathach Thank you for the fix. Please make a pull request with the change and we'll merge it in.

@tannewt
Copy link
Member

tannewt commented Jul 10, 2018

I think this is fixed.

@tannewt tannewt closed this as completed Jul 10, 2018
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