-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix workflows #60
base: develop
Are you sure you want to change the base?
Fix workflows #60
Conversation
Main CMakeLists.txt compiles sdk/pico_sdk and subfolders just link against it Much faster than bash for loop (compiles sdks separately)
9f9e356
to
7302bf9
Compare
Discovered a problem: [ 35%] Building C object pico_fpga_io/CMakeFiles/pico_fpga_io.dir/main.c.obj
/home/runner/work/pico-ice-sdk/pico-ice-sdk/examples/pico_fpga_io/main.c: In function 'main':
/home/runner/work/pico-ice-sdk/pico-ice-sdk/examples/pico_fpga_io/main.c:46:9: warning: implicit declaration of function 'ice_fpga_write'; did you mean 'ice_fpga_init'? [-Wimplicit-function-declaration]
46 | ice_fpga_write(0x55551001, buffer, sizeof buffer);
| ^~~~~~~~~~~~~~
| ice_fpga_init
/home/runner/work/pico-ice-sdk/pico-ice-sdk/examples/pico_fpga_io/main.c:47:9: warning: implicit declaration of function 'ice_fpga_read'; did you mean 'ice_flash_read'? [-Wimplicit-function-declaration]
47 | ice_fpga_read(0x55551001, buffer, sizeof buffer);
| ^~~~~~~~~~~~~
| ice_flash_read
Unusual changes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this maintenance effort! Some things clearly needs fixing. Others is "worse design on purpose" (replicating the same files in every example) for improving the "get started" workflow.
#if ICE_USB_UART0_CDC || ICE_USB_UART1_CDC || ICE_USB_FPGA_CDC || ICE_USB_SPI_CDC | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, very good point!
git -C pico-sdk submodule update --init | ||
git -C lib/pico-sdk submodule update --init |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, only this? That's a lot fewer than I feared. Thanks for the fix!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea of replicating the whole project declaration in every example is that it is possible to copy-paste an example directory to start a new project, replace the symlinks by git submodules, and that's it.
Otherwise, this means a lot of CMakeList.txt
changes need to be done, and there is nowhere where it is documented anymore. Given every project needs a slightly different CMake setup, this was changed from a main CMakeLists.txt
for all examples to each example having its own CMakeLists.txt.
I agree it is easier to maintain as you propose, though.
# colides with pico sdk target | ||
#add_subdirectory(pico_flash) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is right, this needs fixing. Maybe an example_pico_...
and example_ice_...
prefix is the way.
Thank you for raising this.
# doesn't build | ||
#add_subdirectory(pico_ice_blinky) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good to know! This will be addressed in next release.
#include "ice_cram.h" | ||
#include "ice_flash.h" | ||
#include "ice_fpga.h" | ||
#include "ice_comm.h" | ||
#include "ice_led.h" | ||
#include "ice_pmod.h" | ||
#include "ice_spi.h" | ||
#include "ice_sram.h" | ||
#include "ice_usb.h" | ||
#include "ice_wishbone.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, this was not kept in-sync.
I guess you should decide then of you want a easy-to-go example set or a testing infrastructure. Another approach I thought about (because building every single one of them as a separate project with pico-sdk and ice-sdk is too long of a process) is to create a one big cmake file which will build all the examples for workflows. You'd need to include files manually there and duplicate a lot of what CMakeFiles already specify, but it's another solution. |
Each example is tested on Linux and Windows (I do not have a Mac OSX but I would also tests there if I had) at every release, so CI is not there as a complete line of defense against bugs as it requires a USB host and actual hardware to test. Some projects have a "build all" test that simply grabs all the sources, and build them. That would be some good enough approach for CI. Given the default firmware makes use of (almost) all the APIs, that could be some good candidate. |
So one big |
Some things on that repo named "examples" are actually tests (like the C++ example, just there for CI). There could be a tests directory with a single Currently, turning an example into a project only requires replacing the symlinks by git submodules, if we can keep that this is great! https://pico-ice.tinyvision.ai/md_getting_started.html#autotoc_md8 Does it make sense? Maybe I missed something? |
Out of spite of it failing on my other PR
Upped SDK to 1.5.1 (1.5.0 has some implicit includes and doesn't compile with newest GCC (raspberrypi/pico-sdk#1367).
Problems:
pico_flash
example name conflicts with pico sdk lib,pico_ice_blinky
has some weird errors.They're disabled for now.