Ran Through Pins.c and really removed Trailing Whitepace#7521
Ran Through Pins.c and really removed Trailing Whitepace#7521BrainBoardz wants to merge 7 commits into
Conversation
dhalbert
left a comment
There was a problem hiding this comment.
Thanks! Just some cosmetic changes.
You can use pre-commit to check the formatting in advance, to avoid whitespace errors and the like. See https://learn.adafruit.com/building-circuitpython/build-circuitpython#install-pre-commit-3096511
| bool board_requests_safe_mode(void) { | ||
| return false; | ||
| } | ||
|
|
||
| void reset_board(void) { | ||
|
|
||
| } | ||
|
|
||
| void board_deinit(void) { | ||
| } |
There was a problem hiding this comment.
These routines are not needed if they do nothing. There are MP_WEAK default versions that substitute for them.
| bool board_requests_safe_mode(void) { | |
| return false; | |
| } | |
| void reset_board(void) { | |
| } | |
| void board_deinit(void) { | |
| } | |
| // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. |
| { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, | ||
| { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, | ||
| { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, | ||
| { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, | ||
| { MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_GPIO13) }, | ||
| { MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_GPIO15) }, | ||
| { MP_ROM_QSTR(MP_QSTR_SD_CLK), MP_ROM_PTR(&pin_GPIO14) }, | ||
| { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO16) }, | ||
| { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO21) }, | ||
| { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_GPIO0) }, |
There was a problem hiding this comment.
When there are two names for one pin, we usually group them together with whitespace so that's easy to spot. Put the name that is primary (e.g., the board silkscreen) first: that will cause that name to be the preferred print name for the pin. E.g. if your board has TX on the silkscreen, do this:
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) },
{ MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) },
If IO43 is the primary name, reverse the order. In either case, group the "twins" together and surround them with a blank line. You can find examples on other board.
| INTERNAL_FLASH_FILESYSTEM = 1 | ||
| LONGINT_IMPL = MPZ | ||
|
|
||
| # The default queue depth of 16 overflows on release builds, | ||
| # so increase it to 32. | ||
| CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 |
There was a problem hiding this comment.
| INTERNAL_FLASH_FILESYSTEM = 1 | |
| LONGINT_IMPL = MPZ | |
| # The default queue depth of 16 overflows on release builds, | |
| # so increase it to 32. | |
| CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 | |
| INTERNAL_FLASH_FILESYSTEM = 1 | |
| LONGINT_IMPL = MPZ | |
| # The default queue depth of 16 overflows on release builds, | |
| # so increase it to 32. | |
| CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 |
These have been moved to common mpconfigport.mk and can be removed.
|
@BrainBoardz You don't have to make a new PR every time the commit history is changed. |
|
Thanks for all the help with this. I will make the changes you have outlined. At the moment I am going to pull my request for my board as I am having problems with serial mode on my board. I think it is related to a recurring VID/PID issue I have been encountering. If I uses VID 0x0239A/PID 0x80C8 my board works perfectly in MU etc. But this was rejected for CP inclusion as a duplicated VID/PID was found. When I switch to 0x303A/0x90C8 it passes the PID verification but the I get a serial error when trying to use MU (on some machines!). It's very confusing. I'm not sure if it is a case of some systems remembering previous PID/VIDs and locking out serial and I am investigating that. In the meantime, I've contact Espressif to request an additional set of PIDs specific to my ESP32-S3 based Neuron. It will probably be named NeuronS3. If I re-submit it will likely be with this info. |
|
Got it. Mu uses https://github.com/adafruit/Adafruit_Board_Toolkit (which we developed) to find the serial ports. How that is done varies per operating system. If this is Windows, try Uwe Seiber's USB Cleanup tool, which can get rid of stale devices: https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#device-errors-or-problems-on-windows-3094694 |
|
Thanks Dan:
I tried Uwe's tool but no luck. Deleted USB VID keys etc etc. It's a real
head scratcher. I think this is a case of my dev machine (Windows) having
some record of the previous VID/PID. I've tested two other Windows systems
and they were fine (they had never seen that board before). So it is
looking like a VID retention issue I think. Weirdly MU works perfectly fine
other than the serial window. If I put the older firmware on it works
again. It's odd to say the least, but we did run into this issue when
developing the board. If I am convinced this situation is unique to my
particular machine I will submit another pull request with the proper
PID/VID. I wonder if this issue would happen if I compiled the correct
firmware to a brand new board. Hmmmm worth a shot.
…On Tue, Jan 31, 2023 at 5:17 PM Dan Halbert ***@***.***> wrote:
Got it. Mu uses https://github.com/adafruit/Adafruit_Board_Toolkit (which
we developed) to find the serial ports. How that is done varies per
operating system.
If this is Windows, try Uwe Seiber's USB Cleanup tool, which can get rid
of stale devices:
https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#device-errors-or-problems-on-windows-3094694
—
Reply to this email directly, view it on GitHub
<#7521 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AU2ZOBJEDL7UCVWCWBI3273WVGFQNANCNFSM6AAAAAAUL3DWGA>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
|
Hi Dan:
Holy Bats! I uninstalled Mu and re-installed it. Now the serial console
works! I'm not even going to try
and guess what happened. Caches boards or something? But, it might be an
option to look at if people are having issues. I'll make the changes to my
code and do a re-submit. Sorry for all the trouble, it's been an
adventure! 🤕
On Tue, Jan 31, 2023 at 6:37 PM Jeremy Littler ***@***.***>
wrote:
… Thanks Dan:
I tried Uwe's tool but no luck. Deleted USB VID keys etc etc. It's a real
head scratcher. I think this is a case of my dev machine (Windows) having
some record of the previous VID/PID. I've tested two other Windows systems
and they were fine (they had never seen that board before). So it is
looking like a VID retention issue I think. Weirdly MU works perfectly fine
other than the serial window. If I put the older firmware on it works
again. It's odd to say the least, but we did run into this issue when
developing the board. If I am convinced this situation is unique to my
particular machine I will submit another pull request with the proper
PID/VID. I wonder if this issue would happen if I compiled the correct
firmware to a brand new board. Hmmmm worth a shot.
On Tue, Jan 31, 2023 at 5:17 PM Dan Halbert ***@***.***>
wrote:
> Got it. Mu uses https://github.com/adafruit/Adafruit_Board_Toolkit
> (which we developed) to find the serial ports. How that is done varies per
> operating system.
>
> If this is Windows, try Uwe Seiber's USB Cleanup tool, which can get rid
> of stale devices:
> https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#device-errors-or-problems-on-windows-3094694
>
> —
> Reply to this email directly, view it on GitHub
> <#7521 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AU2ZOBJEDL7UCVWCWBI3273WVGFQNANCNFSM6AAAAAAUL3DWGA>
> .
> You are receiving this because you modified the open/close state.Message
> ID: ***@***.***>
>
|
Ran Through Pins.c and really removed Trailing Whitepace