Update pico-sdk to 1.5.1 by bill88t · Pull Request #8091 · adafruit/circuitpython · GitHub
Skip to content

Update pico-sdk to 1.5.1#8091

Merged
jepler merged 4 commits into
adafruit:mainfrom
bill88t:update-picow
Aug 22, 2023
Merged

Update pico-sdk to 1.5.1#8091
jepler merged 4 commits into
adafruit:mainfrom
bill88t:update-picow

Conversation

@bill88t

@bill88t bill88t commented Jun 19, 2023

Copy link
Copy Markdown

I am primarily looking at:
cyw43_arch_disable_sta_mode()
cyw43_arch_disable_ap_mode()

Just note, I have yet to test it.
I will let you know once I have tested everything.

@bill88t

bill88t commented Jun 20, 2023

Copy link
Copy Markdown
Author

@jepler

jepler commented Jun 20, 2023

Copy link
Copy Markdown

We have an existing line of code that sets different flags for SDK files (including -Wno-undef) but it evidently is not being applied to this file. It may be because it is a ".S" file or for another reason I'm not aware of:

SRC_SDK := $(addprefix sdk/, $(SRC_SDK))
$(patsubst %.c,$(BUILD)/%.o,$(SRC_SDK) $(SRC_CYW43)): CFLAGS += -Wno-missing-prototypes -Wno-undef -Wno-unused-function -Wno-nested-externs -Wno-strict-prototypes -Wno-double-promotion -Wno-sign-compare -Wno-unused-variable -Wno-strict-overflow -Ilib/cyw43-driver

This line is acting only on ".c" files listed in SRC_SDK, it would need to act on ".S" files as well. These are listed in SRC_C_UPPER. So it might be something like

diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile
index f23da5a51d..9a7d1b69b7 100644
--- a/ports/raspberrypi/Makefile
+++ b/ports/raspberrypi/Makefile
@@ -236,6 +236,7 @@ SRC_SDK := \
 
 SRC_SDK := $(addprefix sdk/, $(SRC_SDK))
 $(patsubst %.c,$(BUILD)/%.o,$(SRC_SDK) $(SRC_CYW43)): CFLAGS += -Wno-missing-prototypes -Wno-undef -Wno-unused-function -Wno-nested-externs -Wno-strict-prototypes -Wno-double-promotion -Wno-sign-compare -Wno-unused-variable -Wno-strict-overflow -Ilib/cyw43-driver
+$(patsubst %.S,$(BUILD)/%.o,$(SRC_C_CUPPER) $(SRC_CYW43)): CFLAGS += -Wno-undef
 
 SRC_C += \
 	boards/$(BOARD)/board.c \

@tannewt

tannewt commented Jun 20, 2023

Copy link
Copy Markdown
Member

Do we want to wait until after 8.2 to do this?

@bill88t

bill88t commented Jun 20, 2023

Copy link
Copy Markdown
Author

If that is the case, stop_ap for picow is gonna be only on 9.0 since no 8.3. Your choice.
I will complete the PR asap.

@bill88t

bill88t commented Jun 20, 2023

Copy link
Copy Markdown
Author

It now builds, but I saw some instability in wifi connection code (I once got a ConnectionError: Unknown failure 1 on the first connection right after boot, successive connections were ok). It will need some testing and changes. It works a good bit though.

@dhalbert dhalbert added this to the 9.0.0 milestone Jun 27, 2023
@dhalbert dhalbert marked this pull request as draft June 27, 2023 13:18
@dhalbert

Copy link
Copy Markdown
Collaborator

Do we want to wait until after 8.2 to do this?

Yes, we should wait.

Comment thread ports/raspberrypi/Makefile Outdated
-Isdk_config \
-I../../lib/tinyusb/src \
-I../../supervisor/shared/usb \
-I../bindings/cyw43/__init__.h \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This line is surprising. -I arguments are usually to directories that exist, but I don't think this path exists and if it did it'd be a file rather than a directory. Can you just remove this line?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[whoops, this and the other comment are outdated; I selected "cancel review" but didn't realize it'd still post these comments]

Comment thread ports/raspberrypi/Makefile Outdated

# Remove -Wno-stringop-overflow after we can test with CI's GCC 10. Mac's looks weird.
DISABLE_WARNINGS = -Wno-stringop-overflow -Wno-cast-align
DISABLE_WARNINGS = -Wno-stringop-overflow -Wno-cast-align -Wno-undef

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We prefer to keep our code free of -Wundef diagnostics by leaving the flag as-is for most files. My comment suggested how to apply the -Wno-undef compiler flag only to files within the SDK. Did you try this?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I went ahead and fixed this as I intended. The suggestion in my earlier comment had an error that was probably not easy to spot, so it wouldn't have worked as-is.

@jepler jepler marked this pull request as ready for review August 3, 2023 15:21
@jepler

jepler commented Aug 3, 2023

Copy link
Copy Markdown

@dhalbert @bill88t I think this is ready for review now. It looks good to me but I'm not marking it "approved" since I made changes in the branch & I want to make sure it's not premature to go ahead and merge.

@jepler

jepler commented Aug 3, 2023

Copy link
Copy Markdown

Ah I see that @bill88t encountered problems when testing with an earlier build of this PR. I did no testing on hardware. So, we should probably have another round of testing before this is considered merge-worthy.

@jepler jepler marked this pull request as draft August 3, 2023 19:39
@bill88t

bill88t commented Aug 3, 2023

Copy link
Copy Markdown
Author

Oh I forgot this existed. I will look into it tomorrow.

@jepler

jepler commented Aug 4, 2023

Copy link
Copy Markdown

Thanks, let us know what you find in this round of testing!

@bill88t

bill88t commented Aug 4, 2023

Copy link
Copy Markdown
Author

@bill88t bill88t marked this pull request as ready for review August 4, 2023 14:00

@jepler jepler left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks!

@jepler jepler merged commit b589dc2 into adafruit:main Aug 22, 2023
@bill88t bill88t deleted the update-picow branch August 23, 2023 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants