earlephilhower
(Migrated from github.com)
left a comment
Copy Link
Copy Source
We've had 2350 support since launch and I don't think anyone has reported any rate with pwm on it.
Can you please provide a small MCVE that shows the issue?
We've had 2350 support since launch and I don't think anyone has reported any rate with pwm on it.
Can you please provide a small MCVE that shows the issue?
Per grep, the SDK doesn't use TARGET_RP2350 in the source code
$ grep -r TARGET_RP2350 pico-sdk/src/ | wc -l
0
And when I just look for TARGET in source files I don't see anything related to the arch
$ grep -r TARGET_ pico-sdk/src/ | grep -v CMake | grep -v cmake
pico-sdk/src/common/boot_picoboot_headers/include/boot/picoboot_constants.h:#define PICOBOOT_GET_INFO_UF2_TARGET_PARTITION 3
pico-sdk/src/common/pico_binary_info/binary_info.bzl:# PICO_BUILD_DEFINE: PICO_TARGET_NAME, The name of the build target being compiled, type=string, default=target name, group=build
pico-sdk/src/common/pico_binary_info/binary_info.bzl: _build_target_name_defines.append('PICO_TARGET_NAME=\\"{}\\"'.format(build_target_name))
pico-sdk/src/rp2350/hardware_regs/include/hardware/regs/otp.h:#define OTP_SBPI_INSTR_TARGET_RESET _u(0x00)
pico-sdk/src/rp2350/hardware_regs/include/hardware/regs/otp.h:#define OTP_SBPI_INSTR_TARGET_BITS _u(0x00ff0000)
pico-sdk/src/rp2350/hardware_regs/include/hardware/regs/otp.h:#define OTP_SBPI_INSTR_TARGET_MSB _u(23)
pico-sdk/src/rp2350/hardware_regs/include/hardware/regs/otp.h:#define OTP_SBPI_INSTR_TARGET_LSB _u(16)
pico-sdk/src/rp2350/hardware_regs/include/hardware/regs/otp.h:#define OTP_SBPI_INSTR_TARGET_ACCESS "RW"
pico-sdk/src/rp2_common/boot_bootrom_headers/include/boot/bootrom_constants.h:#define ROM_FUNC_GET_UF2_TARGET_PARTITION ROM_TABLE_CODE('G', 'U')
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/core_cm33.h: #if defined (__TARGET_FPU_VFP)
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/core_cm0plus.h: #if defined (__TARGET_FPU_VFP)
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/cmsis_armcc.h:#if ((defined (__TARGET_ARCH_6_M ) && (__TARGET_ARCH_6_M == 1)) || \
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/cmsis_armcc.h: (defined (__TARGET_ARCH_6S_M ) && (__TARGET_ARCH_6S_M == 1)) )
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/cmsis_armcc.h:#if (defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M == 1))
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/cmsis_armcc.h:#if (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))
pico-sdk/src/rp2_common/pico_standard_binary_info/doc.h: * * The program name if defined (unless `PICO_NO_BINARY_SIZE=1`). The value is `PICO_PROGRAM_NAME` or `PICO_TARGET_NAME` if the former isn't defined
pico-sdk/src/rp2_common/pico_standard_binary_info/standard_binary_info.c:#if !defined(PICO_PROGRAM_NAME) && defined(PICO_TARGET_NAME)
pico-sdk/src/rp2_common/pico_standard_binary_info/standard_binary_info.c:#define PICO_PROGRAM_NAME PICO_TARGET_NAME
pico-sdk/src/rp2_common/pico_stdio_rtt/SEGGER/Config/SEGGER_RTT_Conf.h: #if (defined __TARGET_ARCH_6S_M)
pico-sdk/src/rp2_common/pico_stdio_rtt/SEGGER/Config/SEGGER_RTT_Conf.h: #elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M))
pico-sdk/src/rp2_common/pico_bootrom/include/pico/bootrom.h: rom_get_uf2_target_partition_fn func = (rom_get_uf2_target_partition_fn) rom_func_lookup_inline(ROM_FUNC_GET_UF2_TARGET_PARTITION);
Also, any changes would need to be made to rp2350-riscv as well since we support both cores here.
Per `grep`, the SDK doesn't use `TARGET_RP2350` in the source code
````
$ grep -r TARGET_RP2350 pico-sdk/src/ | wc -l
0
````
And when I just look for `TARGET` in source files I don't see anything related to the arch
````
$ grep -r TARGET_ pico-sdk/src/ | grep -v CMake | grep -v cmake
pico-sdk/src/common/boot_picoboot_headers/include/boot/picoboot_constants.h:#define PICOBOOT_GET_INFO_UF2_TARGET_PARTITION 3
pico-sdk/src/common/pico_binary_info/binary_info.bzl:# PICO_BUILD_DEFINE: PICO_TARGET_NAME, The name of the build target being compiled, type=string, default=target name, group=build
pico-sdk/src/common/pico_binary_info/binary_info.bzl: _build_target_name_defines.append('PICO_TARGET_NAME=\\"{}\\"'.format(build_target_name))
pico-sdk/src/rp2350/hardware_regs/include/hardware/regs/otp.h:#define OTP_SBPI_INSTR_TARGET_RESET _u(0x00)
pico-sdk/src/rp2350/hardware_regs/include/hardware/regs/otp.h:#define OTP_SBPI_INSTR_TARGET_BITS _u(0x00ff0000)
pico-sdk/src/rp2350/hardware_regs/include/hardware/regs/otp.h:#define OTP_SBPI_INSTR_TARGET_MSB _u(23)
pico-sdk/src/rp2350/hardware_regs/include/hardware/regs/otp.h:#define OTP_SBPI_INSTR_TARGET_LSB _u(16)
pico-sdk/src/rp2350/hardware_regs/include/hardware/regs/otp.h:#define OTP_SBPI_INSTR_TARGET_ACCESS "RW"
pico-sdk/src/rp2_common/boot_bootrom_headers/include/boot/bootrom_constants.h:#define ROM_FUNC_GET_UF2_TARGET_PARTITION ROM_TABLE_CODE('G', 'U')
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/core_cm33.h: #if defined (__TARGET_FPU_VFP)
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/core_cm0plus.h: #if defined (__TARGET_FPU_VFP)
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/cmsis_armcc.h:#if ((defined (__TARGET_ARCH_6_M ) && (__TARGET_ARCH_6_M == 1)) || \
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/cmsis_armcc.h: (defined (__TARGET_ARCH_6S_M ) && (__TARGET_ARCH_6S_M == 1)) )
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/cmsis_armcc.h:#if (defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M == 1))
pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include/cmsis_armcc.h:#if (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))
pico-sdk/src/rp2_common/pico_standard_binary_info/doc.h: * * The program name if defined (unless `PICO_NO_BINARY_SIZE=1`). The value is `PICO_PROGRAM_NAME` or `PICO_TARGET_NAME` if the former isn't defined
pico-sdk/src/rp2_common/pico_standard_binary_info/standard_binary_info.c:#if !defined(PICO_PROGRAM_NAME) && defined(PICO_TARGET_NAME)
pico-sdk/src/rp2_common/pico_standard_binary_info/standard_binary_info.c:#define PICO_PROGRAM_NAME PICO_TARGET_NAME
pico-sdk/src/rp2_common/pico_stdio_rtt/SEGGER/Config/SEGGER_RTT_Conf.h: #if (defined __TARGET_ARCH_6S_M)
pico-sdk/src/rp2_common/pico_stdio_rtt/SEGGER/Config/SEGGER_RTT_Conf.h: #elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M))
pico-sdk/src/rp2_common/pico_bootrom/include/pico/bootrom.h: rom_get_uf2_target_partition_fn func = (rom_get_uf2_target_partition_fn) rom_func_lookup_inline(ROM_FUNC_GET_UF2_TARGET_PARTITION);
````
Also, any changes would need to be made to `rp2350-riscv` as well since we support both cores here.
Sorry, some stuff got lost in translation. The full story is that we use SimpleFOC, which checks for the flag (https://github.com/simplefoc/Arduino-FOC/blob/c8002cc046bbbc6b4a1a9b9fda567af399f22eca/src/drivers/hardware_specific/rp2040/rp2040_mcu.cpp#L9).
I then saw that the flag is set for the platformio build, and similar flags are set for the 2040 (which i think is why simplefoc checks for the flag). So I don't think that the flag is necessarily needed, but it is used by external libraries, based on assumptions from the rp2040 flags.
Hope this clears things up.
Sorry, some stuff got lost in translation. The full story is that we use SimpleFOC, which checks for the flag (https://github.com/simplefoc/Arduino-FOC/blob/c8002cc046bbbc6b4a1a9b9fda567af399f22eca/src/drivers/hardware_specific/rp2040/rp2040_mcu.cpp#L9).
I then saw that the flag is set for the platformio build, and similar flags are set for the 2040 (which i think is why simplefoc checks for the flag). So I don't think that the flag is necessarily needed, but it is used by external libraries, based on assumptions from the rp2040 flags.
Hope this clears things up.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Add flag for compiling RP2350 target to set PWMs correctly.
We've had 2350 support since launch and I don't think anyone has reported any rate with pwm on it.
Can you please provide a small MCVE that shows the issue?
Per
grep, the SDK doesn't useTARGET_RP2350in the source codeAnd when I just look for
TARGETin source files I don't see anything related to the archAlso, any changes would need to be made to
rp2350-riscvas well since we support both cores here.Sorry, some stuff got lost in translation. The full story is that we use SimpleFOC, which checks for the flag (https://github.com/simplefoc/Arduino-FOC/blob/c8002cc046bbbc6b4a1a9b9fda567af399f22eca/src/drivers/hardware_specific/rp2040/rp2040_mcu.cpp#L9).
I then saw that the flag is set for the platformio build, and similar flags are set for the 2040 (which i think is why simplefoc checks for the flag). So I don't think that the flag is necessarily needed, but it is used by external libraries, based on assumptions from the rp2040 flags.
Hope this clears things up.
OK, that makes more sense. Can you add it to the RISC-V definitions, too?
Added it to the risc-v definition as well. Thanks!
Thx!