Skip to content

Commit 79ee0f9

Browse files
Merge pull request #6 from soburi/merge-2.0.0
Update 2.0.0
2 parents fba7162 + 1cd4d73 commit 79ee0f9

File tree

1,003 files changed

+361994
-66039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,003 files changed

+361994
-66039
lines changed

.bazelignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Don't accidentally pick up external CMake deps with Bazel build files.
2+
build
3+
# Don't treat submodules as part of this project.
4+
lib

.bazelrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Required for new toolchain resolution API.
2+
build --incompatible_enable_cc_toolchain_resolution
3+
build --@rules_cc//cc/toolchains:experimental_enable_rule_based_toolchains
4+
5+
# Silence all C/C++ warnings in external code.
6+
common --per_file_copt=external/.*@-w
7+
common --host_per_file_copt=external/.*@-w
8+
9+
# Produce useful output when the build fails.
10+
common --verbose_failures

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.2.1

.github/workflows/cmake.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
name: CMake
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches-ignore:
5+
- 'iar/**'
6+
pull_request:
37

48
env:
59
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
610
BUILD_TYPE: Release
711

812
jobs:
913
build:
10-
if: github.repository_owner == 'raspberrypi'
14+
# cannot specify filter for pull_request in on: above, so do it here
15+
if: github.repository_owner == 'raspberrypi' && (github.event_name != 'pull_request' || !startsWith(github.head_ref, 'iar/'))
1116
runs-on: [self-hosted, Linux, X64]
1217

1318
steps:
@@ -33,17 +38,13 @@ jobs:
3338
# access regardless of the host operating system
3439
shell: bash
3540
working-directory: ${{github.workspace}}/build
36-
# Note the current convention is to use the -S and -B options here to specify source
37-
# and build directories, but this is only available with CMake 3.13 and higher.
41+
# Note the current convention is to use the -S and -B options here to specify source
42+
# and build directories, but this is only available with CMake 3.13 and higher.
3843
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
3944
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPICO_SDK_TESTS_ENABLED=1
4045

41-
- name: Get core count
42-
id: core_count
43-
run : cat /proc/cpuinfo | grep processor | wc -l
44-
4546
- name: Build
4647
working-directory: ${{github.workspace}}/build
4748
shell: bash
4849
# Execute the build. You can specify a specific target with "--target <NAME>"
49-
run: cmake --build . --config $BUILD_TYPE --parallel ${{steps.core_count.outputs.output}}
50+
run: cmake --build . --config $BUILD_TYPE --parallel $(nproc)

.github/workflows/macOS.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ jobs:
2323
- name: Install dependencies
2424
run: |
2525
brew install cmake
26-
brew tap ArmMbed/homebrew-formulae
27-
brew install arm-none-eabi-gcc
26+
brew install --cask gcc-arm-embedded
2827
2928
- name: Build Project
3029
# bash required otherwise this mysteriously (no error) fails at "Generating cyw43_bus_pio_spi.pio.h"

.github/workflows/multi-gcc.yml

Lines changed: 27 additions & 39 deletions
Large diffs are not rendered by default.

.github/workflows/scripts/generate_multi_gcc_workflow.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
workflow_dispatch:
4040
push:
4141
branches:
42-
- 'develop'
4342
- 'master'
43+
- 'test_workflow'
4444
4545
jobs:
4646
build:
@@ -59,10 +59,6 @@
5959
6060
- name: Checkout submodules
6161
run: git submodule update --init
62-
63-
- name: Get core count
64-
id: core_count
65-
run : cat /proc/cpuinfo | grep processor | wc -l
6662
'''
6763

6864
for gcc_version, toolchain_path in gcc_versions_sorted.items():
@@ -71,6 +67,6 @@
7167
output += " - name: GCC {} {}\n".format(gcc_version, build_type)
7268
output += " if: always()\n"
7369
output += " shell: bash\n"
74-
output += " run: cd ${{{{github.workspace}}}}; mkdir -p build; rm -rf build/*; cd build; cmake ../ -DPICO_SDK_TESTS_ENABLED=1 -DCMAKE_BUILD_TYPE={} -DPICO_TOOLCHAIN_PATH={} -DPICO_BOARD=pico_w; make -j ${{{{steps.core_count.outputs.output}}}}\n".format(build_type, toolchain_path)
70+
output += " run: cd ${{{{github.workspace}}}}; mkdir -p build; rm -rf build/*; cd build; cmake ../ -DPICO_SDK_TESTS_ENABLED=1 -DCMAKE_BUILD_TYPE={} -DPICO_TOOLCHAIN_PATH={} -DPICO_BOARD=pico_w; make --output-sync=target --no-builtin-rules --no-builtin-variables -j$(nproc)\n".format(build_type, toolchain_path)
7571

7672
print(output)

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@
33
cmake-*
44
.DS_Store
55
build
6+
build-*
7+
8+
bazel-*
9+
10+
# Ignore until https://github.com/bazelbuild/bazel/issues/20369 is fixed.
11+
MODULE.bazel.lock
12+
__pycache__/

BUILD.bazel

Whitespace-only changes.

CMakeLists.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.13)
1+
cmake_minimum_required(VERSION 3.13...3.27)
22

33
# Note: this CMakeLists.txt can be used as a top-level CMakeLists.txt for the SDK itself. For all other uses
44
# it is included as a subdirectory via the pico_sdk_init() method provided by pico_sdk_init.cmake
@@ -9,6 +9,18 @@ if (NOT TARGET _pico_sdk_inclusion_marker)
99

1010
project(pico_sdk C CXX ASM)
1111

12+
string(REGEX MATCH "Clang" PICO_C_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}")
13+
string(REGEX MATCH "GNU" PICO_C_COMPILER_IS_GNU "${CMAKE_C_COMPILER_ID}")
14+
string(REGEX MATCH "IAR" PICO_C_COMPILER_IS_IAR "${CMAKE_C_COMPILER_ID}")
15+
pico_register_common_scope_var(PICO_C_COMPILER_IS_CLANG)
16+
pico_register_common_scope_var(PICO_C_COMPILER_IS_GNU)
17+
pico_register_common_scope_var(PICO_C_COMPILER_IS_IAR)
18+
pico_register_common_scope_var(PICO_SDK_VERSION_MAJOR)
19+
pico_register_common_scope_var(PICO_SDK_VERSION_MINOR)
20+
pico_register_common_scope_var(PICO_SDK_VERSION_REVISION)
21+
pico_register_common_scope_var(PICO_SDK_VERSION_PRE_RELEASE_ID)
22+
pico_register_common_scope_var(PICO_SDK_VERSION_STRING)
23+
1224
message("Build type is ${CMAKE_BUILD_TYPE}")
1325
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
1426
if (PICO_DEOPTIMIZED_DEBUG)
@@ -31,6 +43,9 @@ if (NOT TARGET _pico_sdk_inclusion_marker)
3143
add_sub_list_dirs(PICO_SDK_PRE_LIST_DIRS)
3244
add_sub_list_files(PICO_SDK_PRE_LIST_FILES)
3345

46+
# needed by certain functions
47+
set(PICO_TOOLS_DIR "${CMAKE_CURRENT_LIST_DIR}/tools" CACHE INTERNAL "")
48+
3449
add_subdirectory(tools)
3550
add_subdirectory(src)
3651

@@ -54,4 +69,3 @@ if (NOT TARGET _pico_sdk_inclusion_marker)
5469
pico_promote_common_scope_vars()
5570
endif()
5671
endif()
57-

0 commit comments

Comments
 (0)