8000 mimxrt10xx: Disable pin_reset on 1060 boards by hierophect · Pull Request #3001 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

mimxrt10xx: Disable pin_reset on 1060 boards #3001

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 &ldquo 10000 ;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

Merged
merged 3 commits into from
Jun 5, 2020
Merged

mimxrt10xx: Disable pin_reset on 1060 boards #3001

merged 3 commits into from
Jun 5, 2020

Conversation

hierophect
Copy link
Collaborator
@hierophect hierophect commented Jun 2, 2020

This PR removes reset_all_pins for the 1060 line, as a temporary fix for what appears to be a general hard crash when pins in this line are reset. Also expands the never reset pin set in board.c to appropriately cover all flash chips on the Teensy 4.0 and 4.1, but since these pins will not be called by reset_all, this change will only affect future fixed commits.

This PR should be followed up by a more general fix for reset_all_pins on the 1060.

Resolves #2998

@jerryneedell
Copy link
Collaborator

This fails to compile for the teensy41

jerryneedell@jerryneedell-ubuntu-macmini:~/projects/circuitpython_master/ports/mimxrt10xx$ make BOARD=teensy41 
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated
boards/teensy41/board.c: In function 'board_init':
boards/teensy41/board.c:33:5: error: implicit declaration of function 'common_hal_never_reset_pin' [-Werror=implicit-function-declaration]
   33 |     common_hal_never_reset_pin(&pin_GPIO_SD_B1_06);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
boards/teensy41/board.c:33:5: warning: nested extern declaration of 'common_hal_never_reset_pin' [-Wnested-externs]
boards/teensy41/board.c:33:33: error: 'pin_GPIO_SD_B1_06' undeclared (first use in this function)
   33 |     common_hal_never_reset_pin(&pin_GPIO_SD_B1_06);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:33:33: note: each undeclared identifier is reported only once for each function it appears in
boards/teensy41/board.c:34:33: error: 'pin_GPIO_SD_B1_07' undeclared (first use in this function)
   34 |     common_hal_never_reset_pin(&pin_GPIO_SD_B1_07);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:35:33: error: 'pin_GPIO_SD_B1_08' undeclared (first use in this function)
   35 |     common_hal_never_reset_pin(&pin_GPIO_SD_B1_08);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:36:33: error: 'pin_GPIO_SD_B1_09' undeclared (first use in this function)
   36 |     common_hal_never_reset_pin(&pin_GPIO_SD_B1_09);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:37:33: error: 'pin_GPIO_SD_B1_10' undeclared (first use in this function)
   37 |     common_hal_never_reset_pin(&pin_GPIO_SD_B1_10);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:38:33: error: 'pin_GPIO_SD_B1_11' undeclared (first use in this function)
   38 |     common_hal_never_reset_pin(&pin_GPIO_SD_B1_11);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:41:33: error: 'pin_GPIO_AD_B0_04' undeclared (first use in this function)
   41 |     common_hal_never_reset_pin(&pin_GPIO_AD_B0_04);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:42:33: error: 'pin_GPIO_AD_B0_06' undeclared (first use in this function)
   42 |     common_hal_never_reset_pin(&pin_GPIO_AD_B0_06);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:43:33: error: 'pin_GPIO_AD_B0_07' undeclared (first use in this function)
   43 |     common_hal_never_reset_pin(&pin_GPIO_AD_B0_07);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:44:33: error: 'pin_GPIO_AD_B0_08' undeclared (first use in this function)
   44 |     common_hal_never_reset_pin(&pin_GPIO_AD_B0_08);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:45:33: error: 'pin_GPIO_AD_B0_09' undeclared (first use in this function)
   45 |     common_hal_never_reset_pin(&pin_GPIO_AD_B0_09);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:46:33: error: 'pin_GPIO_AD_B0_10' undeclared (first use in this function)
   46 |     common_hal_never_reset_pin(&pin_GPIO_AD_B0_10);
      |                                 ^~~~~~~~~~~~~~~~~
boards/teensy41/board.c:47:33: error: 'pin_GPIO_EMC_01' undeclared (first use in this function)
   47 |     common_hal_never_reset_pin(&pin_GPIO_EMC_01);
      |                                 ^~~~~~~~~~~~~~~
boards/teensy41/board.c:48:33: error: 'pin_GPIO_B0_13' undeclared (first use in this function)
   48 |     common_hal_never_reset_pin(&pin_GPIO_B0_13);
      |                                 ^~~~~~~~~~~~~~
boards/teensy41/board.c:49:33: error: 'pin_GPIO_AD_B0_11' undeclared (first use in this function)
   49 |     common_hal_never_reset_pin(&pin_GPIO_AD_B0_11);
      |                                 ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make: *** [../../py/mkrules.mk:55: build-teensy41/boards/teensy41/board.o] Error 1

@arturo182 arturo182 added the mimxrt10xx iMX RT based boards such as Teensy 4.x label Jun 3, 2020
@hierophect hierophect changed the title mimxrt10xx: Update teensy 4.0/4.1 pin protections mimxrt10xx: Disable pin_reset on 1060 boards Jun 3, 2020
@hierophect
Copy link
Collaborator Author

I've updated this PR to disable reset_all_pins on the 1060 as a temporary fix for the teensy boards and EVK. I'll revisit this when I have some more time to investigate what's going on with the debugger - I'm currently unable to erase or flash the 1060 EVK with a Jlink, and it's making this bug a lot more daunting than it should be.

@hierophect
Copy link
Collaborator Author

@jerryneedell also fixed your issue compiling the 4.1, that was just a missing include.

@jerryneedell
Copy link
Collaborator
jerryneedell commented Jun 3, 2020

@hierophect thanks -- tested on teensy41 -- looks good!

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.4.0-beta.0-485-gc93ccd1e9 on 2020-06-03; Teensy 4.1 with IMXRT1062DVJ6A
>>> 

teensy 4.0 is OK as well

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.4.0-beta.0-485-gc93ccd1e9 on 2020-06-03; Teensy 4.0 with IMXRT1062DVJ6A
>>> 

@hierophect
Copy link
Collaborator Author
hierophect commented Jun 4, 2020

@tannewt new comment is in, sorry if I've been holding up the beta! I'll start work on a permanent fix as soon as I've checked out Jepler's timer issue.

@hierophect hierophect requested a review from tannewt June 4, 2020 17:31
Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt
Copy link
Member
tannewt commented Jun 5, 2020

@tannewt new comment is in, sorry if I've been holding up the beta! I'll start work on a permanent fix as soon as I've checked out Jepler's timer issue.

No worries. I've been distracted by other thi 9864 ngs.

@tannewt tannewt merged commit 6400113 into adafruit:master Jun 5, 2020
@hierophect hierophect deleted the mimxrt-teensy-boot branch June 5, 2020 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mimxrt10xx iMX RT based boards such as Teensy 4.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

teensy 4.1 and 4.0 builds not booting
4 participants
0