Skip to content
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

Add Datanoise PicoADK v2 (RP2350). #2413

Merged
merged 24 commits into from
Sep 24, 2024

Conversation

DatanoiseTV
Copy link
Contributor

No description provided.

@DatanoiseTV
Copy link
Contributor Author

@earlephilhower How can I add variants of the v2 board? E.g. there is a version without PSRAM and a version with 8MB PSRAM.

@earlephilhower
Copy link
Owner

If it's just PSRAM then I might special-case if boards==adk2: BuildPSRAM(). Then there's the board and you can pick from a sub-menu the PSRAM included.

@DatanoiseTV
Copy link
Contributor Author

If it's just PSRAM then I might special-case if boards==adk2: BuildPSRAM(). Then there's the board and you can pick from a sub-menu the PSRAM included.

Is BuildPSRAM() something you need to implement or is there something I could do? The V2 is coming out in the next couple of weeks. Let me know if you want one!

@earlephilhower
Copy link
Owner

def BuildPSRAM(name):

@DatanoiseTV
Copy link
Contributor Author

@earlephilhower Ok, done!

@DatanoiseTV
Copy link
Contributor Author

The PSRAM_CS is fixed at GPIO0 when the PSRAM is used. What is the best place to put it?
Also, please check the BuildPSRAM() if it is at the correct spot.

@earlephilhower
Copy link
Owner

The CS define is normally set in the variant file.

@earlephilhower
Copy link
Owner

Also, I think the psram function should be called in the next if block , not where you've got it now. The current code will miss the flash filesystem size completely, I think.

@DatanoiseTV
Copy link
Contributor Author

Also, I think the psram function should be called in the next if block , not where you've got it now. The current code will miss the flash filesystem size completely, I think.

Done.

@@ -298,7 +298,10 @@ def MakeBoard(name, chip, vendor_name, product_name, vid, pid, pwr, boarddefine,
BuildFlashMenu(name, chip, 8*1024*1024, [0, 7*1024*1024, 4*1024*1024, 2*1024*1024])
BuildFlashMenu(name, chip, 16*1024*1024, [0, 15*1024*1024, 14*1024*1024, 12*1024*1024, 8*1024*1024, 4*1024*1024, 2*1024*1024])
elif name == "datanoisetv_picoadk_v2":
BuildPSRAM(name)
BuildPSRAM(name)
BuildPSRAMCS(name)
Copy link
Owner

Choose a reason for hiding this comment

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

BukldPSRAMCS, BuildPSRAMFREQ, and BuildFreq aren't needed here. You have a hard-wired board and know the CS pin (which should be a #define PSRAM_CS xxx in variants/datanoisetv_v2/pins_arduino.h). There's no reason to have these as a menu. Only the first PSRAM size via buildpsram is needed here. See the challenger_2350_bconnect or other RP2350 board w/PSRAM for more info...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I should just leave BuildPSRAM? Could you check the latest commit and maybe make necessary changes if possible? I am currently working on some example code.

Copy link
Owner

Choose a reason for hiding this comment

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

If your board always has PSRAM then there's no need for these menus. Define the proper pin/clock/CS in the variant.h like in the other 2350+PSRAM boards and it will "just work."

If there are 2 boards, 1 with and 1 without, then only the BuildPSRAM menu makes sense to have because everything else if defined by the PCB.

BuildFreq is called 3 lines below, so the instance here is duplicate That's not legal and I'm not sure what the IDE will do in that case. Best case you end up with some weird dup's menu items.

@DatanoiseTV
Copy link
Contributor Author

I have implemented the changes. Could you check?

@earlephilhower
Copy link
Owner

The boards file is still not matching the generated output of makeboards, so something is still not quite up to date in the commits to the PR...

@DatanoiseTV
Copy link
Contributor Author

The boards file is still not matching the generated output of makeboards, so something is still not quite up to date in the commits to the PR...

I aplologise. I had some lack of sleep recently. Just pulled from master, merged and reworked it.

boards.txt Show resolved Hide resolved
@@ -326,6 +326,8 @@ def MakeBoard(name, chip, vendor_name, product_name, vid, pid, pwr, boarddefine,
BuildPSRAMCS(name)
BuildPSRAM(name)
BuildPSRAMFreq(name)
elif name == "datanoisetv_picoadk_v2":
BuildFreq(name, 400)
Copy link
Owner

Choose a reason for hiding this comment

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

Sorry, but again you still have 2 frequency menus being generated. Line 323 and line 330.

Copy link
Owner

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

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

Now it looks OK. Are we ready for merge on this, or are you still working on things WRT VID/etc.?

@DatanoiseTV
Copy link
Contributor Author

Now it looks OK. Are we ready for merge on this, or are you still working on things WRT VID/etc.?
Ready to merge.

@earlephilhower
Copy link
Owner

Assuming the close was a mistake, re-opening and will merge after CI

@earlephilhower earlephilhower merged commit 39ad2ae into earlephilhower:master Sep 24, 2024
40 checks passed
@DatanoiseTV DatanoiseTV deleted the picoadk-v2 branch September 24, 2024 19:29
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.

2 participants