update doc + enable multicore
This commit is contained in:
parent
b27b45fb9a
commit
259fb24ff9
12
README.md
12
README.md
@ -1,21 +1,23 @@
|
|||||||
# Picoco
|
# Picoco
|
||||||
|
|
||||||
A repository to store Rasbperry Pico C projects.
|
A repository to store Rasbperry Pico C sample projects.
|
||||||
|
|
||||||
It uses the **Freenove Super Starter Kit For Raspberry Pi Pico**, the tutorial and ressources can be found [here](https://github.com/Freenove/Freenove_Super_Starter_Kit_for_Raspberry_Pi_Pico).
|
It uses the **Freenove Super Starter Kit For Raspberry Pi Pico**, the tutorial and ressources can be found [here](https://github.com/Freenove/Freenove_Super_Starter_Kit_for_Raspberry_Pi_Pico).
|
||||||
|
|
||||||
The official documentation to start with the Raspberry Pi Pico: [Getting started with Raspberry Pi Pico-series](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf).
|
The official documentation to start with the Raspberry Pi Pico: [Getting started with Raspberry Pi Pico-series](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf). Some examples can be found here: [github.com/raspberrypi/pico-examples](https://github.com/raspberrypi/pico-examples).
|
||||||
|
|
||||||
|
**NOTE**: the configuration defined in `config/FreeRTOSConfig.h` is specific for the **Raspberry Pi Pico 2 RP2350**. Feel free to update it for your Pico spec.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
In order to build and deploy the binary in the Raspberry Pi Pico, you have to install the **Pico C SDK** and **Picotool**.
|
In order to build and deploy the binary in the Raspberry Pi Pico, you have to install the **Pico C SDK**, **Picotool** & **FreeRTOS Raspberry Kernel**.
|
||||||
|
|
||||||
So, you need to execute the following command that will installed both:
|
So, you need to execute the following command that will installed all:
|
||||||
```bash
|
```bash
|
||||||
make install
|
make install
|
||||||
```
|
```
|
||||||
|
|
||||||
**NOTE**: this will install the **SDK** and **Picotool** in the current directory. If you want to set an other intallation path,
|
**NOTE**: this will install the **SDK**, **Picotool** and **FreeRTOS** in the current directory. If you want to set an other intallation path,
|
||||||
set the `INSTALL_PATH` variable. The `INSTALL_PATH` directory must exists, create it before and make sure user have write rights.
|
set the `INSTALL_PATH` variable. The `INSTALL_PATH` directory must exists, create it before and make sure user have write rights.
|
||||||
|
|
||||||
The **SDK** and **Picotool** version used is: **2.1.0**.
|
The **SDK** and **Picotool** version used is: **2.1.0**.
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
#define configUSE_IDLE_HOOK 0 // 1: Use Idle hook function
|
#define configUSE_IDLE_HOOK 0 // 1: Use Idle hook function
|
||||||
#define configUSE_TICK_HOOK 0 // 1: Use Tick hook function
|
#define configUSE_TICK_HOOK 0 // 1: Use Tick hook function
|
||||||
#define configIDLE_SHOULD_YIELD 1 // 1: Idle task yields to same priority tasks
|
#define configIDLE_SHOULD_YIELD 1 // 1: Idle task yields to same priority tasks
|
||||||
|
#define configUSE_PASSIVE_IDLE_HOOK 0 // No passive idle hook (SMP-specific)
|
||||||
|
|
||||||
// System Clock Configuration
|
// System Clock Configuration
|
||||||
#define configCPU_CLOCK_HZ ((unsigned long)150000000) // CPU frequency: 150 MHz for RP2350
|
#define configCPU_CLOCK_HZ ((unsigned long)150000000) // CPU frequency: 150 MHz for RP2350
|
||||||
@ -58,11 +59,27 @@
|
|||||||
|
|
||||||
// Hardware Specific Configuration
|
// Hardware Specific Configuration
|
||||||
#define configENABLE_FPU 1 // 1: Enable Floating Point Unit
|
#define configENABLE_FPU 1 // 1: Enable Floating Point Unit
|
||||||
|
#define configUSE_TASK_FPU_SUPPORT 1 // Enable FPU context save/restore
|
||||||
#define configENABLE_TRUSTZONE 0 // 1: Enable TrustZone
|
#define configENABLE_TRUSTZONE 0 // 1: Enable TrustZone
|
||||||
|
#define configRUN_FREERTOS_SECURE_ONLY 0 // Non-secure mode to match port
|
||||||
#define configENABLE_MPU 0 // 1: Enable Memory Protection Unit (defined twice in original)
|
#define configENABLE_MPU 0 // 1: Enable Memory Protection Unit (defined twice in original)
|
||||||
#define configRUN_FREERTOS_SECURE_ONLY 1 // 1: Run in secure mode only
|
#define configRUN_FREERTOS_SECURE_ONLY 1 // 1: Run in secure mode only
|
||||||
#define configUSE_16_BIT_TICKS 0 // 0: Use 32-bit ticks, 1: Use 16-bit ticks
|
#define configUSE_16_BIT_TICKS 0 // 0: Use 32-bit ticks, 1: Use 16-bit ticks
|
||||||
|
|
||||||
|
// SMP Configuration
|
||||||
|
#define configNUMBER_OF_CORES 2 // RP2350 has 2 cores
|
||||||
|
#if configNUMBER_OF_CORES > 1
|
||||||
|
#define configUSE_SMP 1 // Enable Symmetric Multiprocessing
|
||||||
|
#define configUSE_CORE_AFFINITY 1
|
||||||
|
#define configSMP_SPINLOCK_0 0 // Spinlock 0 for SMP synchronization
|
||||||
|
#define configSMP_SPINLOCK_1 1 // Spinlock 1 (optional, depending on port)
|
||||||
|
|
||||||
|
/* Fallback for missing portmacro.h definition */
|
||||||
|
#ifndef taskDISABLE_INTERRUPTS
|
||||||
|
#define taskDISABLE_INTERRUPTS() __asm volatile ("cpsid i" ::: "memory")
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// API Inclusion Configuration
|
// API Inclusion Configuration
|
||||||
#define INCLUDE_vTaskPrioritySet 1 // Include task priority set API
|
#define INCLUDE_vTaskPrioritySet 1 // Include task priority set API
|
||||||
#define INCLUDE_uxTaskPriorityGet 1 // Include task priority get API
|
#define INCLUDE_uxTaskPriorityGet 1 // Include task priority get API
|
||||||
|
|||||||
@ -17,18 +17,6 @@ set(FREERTOS_CONFIG_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../config)
|
|||||||
|
|
||||||
include(${FREERTOS_SRC_DIRECTORY}/portable/ThirdParty/GCC/RP2350_ARM_NTZ/FreeRTOS_Kernel_import.cmake)
|
include(${FREERTOS_SRC_DIRECTORY}/portable/ThirdParty/GCC/RP2350_ARM_NTZ/FreeRTOS_Kernel_import.cmake)
|
||||||
|
|
||||||
# add_library(FreeRTOS STATIC
|
|
||||||
# ${FREERTOS_SRC_DIRECTORY}/event_groups.c
|
|
||||||
# ${FREERTOS_SRC_DIRECTORY}/list.c
|
|
||||||
# ${FREERTOS_SRC_DIRECTORY}/queue.c
|
|
||||||
# ${FREERTOS_SRC_DIRECTORY}/stream_buffer.c
|
|
||||||
# ${FREERTOS_SRC_DIRECTORY}/tasks.c
|
|
||||||
# ${FREERTOS_SRC_DIRECTORY}/timers.c
|
|
||||||
# ${FREERTOS_SRC_DIRECTORY}/portable/MemMang/heap_3.c
|
|
||||||
# ${FREERTOS_SRC_DIRECTORY}/portable/GCC/ARM_CM33_NTZ/non_secure/port.c
|
|
||||||
# ${FREERTOS_SRC_DIRECTORY}/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c
|
|
||||||
# )
|
|
||||||
|
|
||||||
# Include FreeRTOS directories
|
# Include FreeRTOS directories
|
||||||
include_directories(
|
include_directories(
|
||||||
${FREERTOS_CONFIG_DIRECTORY}
|
${FREERTOS_CONFIG_DIRECTORY}
|
||||||
@ -60,11 +48,11 @@ pico_set_program_version(simple_led "0.1")
|
|||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
simple_led
|
simple_led
|
||||||
pico_stdlib
|
pico_stdlib
|
||||||
|
pico_multicore
|
||||||
hardware_exception
|
hardware_exception
|
||||||
# FreeRTOS
|
|
||||||
)
|
)
|
||||||
|
|
||||||
pico_enable_stdio_uart(simple_led 1)
|
pico_enable_stdio_uart(simple_led 0)
|
||||||
pico_enable_stdio_usb(simple_led 1)
|
pico_enable_stdio_usb(simple_led 1)
|
||||||
|
|
||||||
pico_add_extra_outputs(simple_led)
|
pico_add_extra_outputs(simple_led)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user