Bolivar, Marti
Hello,
"yasokada via Lists.Zephyrproject.Org" <yasokada=gmail.com@lists.zephyrproject.org> writes: Q1. I do not understand why step 3 is necessary. I don't have this board, and I can't help you with Q1 or Q3, but for Q2: you can always run this command to get help on options that are available to you: $ west flash --context -d <YOUR_BUILD_DIR> In this case, you are looking for the --bossac-port option. Best, Marti
|
||||||||||||||
|
||||||||||||||
My environment:
Ubuntu 18.04 LTS board: Adafruit Trinket M0 RTOS: Zephyr 2.1.0-rc1 I was trying to use Adafruit Trinket M0. ### connections https://docs.zephyrproject.org/latest/boards/arm/adafruit_trinket_m0/doc/index.html > Flash > ... > 2. Connect the Trinket M0 to your host computer using USB > 3. Connect a 3.3 V USB to serial adapter to the board and to the host. See the Serial Port section above for the board’s pin connections. With the above step 2, the device is '/dev/ttyACM0'. With the above step 3, the device may depends on the used "USB to serial adapter". For example, I use some FTDI adapter, which becomes '/dev/ttyUSB0'. When I try "west flash", the Zephyr will use "/dev/ttyACM0'. This is defined at 'scripts/west_commands/runners/bossac.py' as DEFAULT_BOSSAC_PORT = '/dev/ttyACM0'. So, my understanding is that : > 2. Connect the Trinket M0 to your host computer using USB is for west flash. > 3. Connect a 3.3 V USB to serial adapter to the board and to the host. See the Serial Port section above for the board’s pin connections.
is not clear what to use. With these information, I thought I can flash by using USB connected at the above step 2. ### west flash I tried to west flash for Trinket M0. 1. connect USB to Trinket M0 2. sudo chmod +777 /dev/ttyACM0 (to add permission to write flash) 3. west flash I have following error. What is wrong? ``` $ west flash
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner bossac
bossac: invalid option -- 'o'
Try 'bossac -h' or 'bossac --help' for more information
``` Q1. I do not understand why step 3 is necessary. Q2. If the step 3 is used for west flash, how can I change /dev/ttyACM0 to /dev/ttyUSB0 for west flash? Q3. If step 3 is not relevant to west flash, what is wrong with the above procedure?
|
||||||||||||||
|
||||||||||||||
spi_transceive() does not clock out the SCK for receiving
#spi
@yasokada
My Environment:
Ubuntu 18.04 LTS Board: STM32F769 Discovery Kit RTOS: Zephyr 2.1.0-rc1 Oscilloscope: Analog Discovery 2 SPI device: SRAM memory (23K256) I am trying to use SPI with my SRAM memory (23K256). I used spi_transceive() to send and receive with the SRAM memory. The spi_transceive() can transmit 0x02 0x00 0x10 0xFA with my_spi_tranceive(spi, &spi_cfg, txbufs, 4, NULL, 0); However, the next spi_transceive() only transmit 0x03 0x00 0x10 with my_spi_tranceive(spi, &spi_cfg, txbufs, 3, rxbufs, 1); then, the SCK clock for reading the one byte does not occur. I also tried by loopbacking the SPI, resulting in same result. I thought spi_transceive() can send and then receive with SPI device. What am I missing? Here is the logic capture when running main.c (left side is 0x02 0x00 0x10 0xFA, right side is 0x03 0x00 0x10, then without SCK for receiving)
|
||||||||||||||
|
||||||||||||||
Re: BBC-Microbit PIR sensor
#zephyrbluetoothmesh
#sensor
#ble
#bluetoothmesh
#gpio
Hi,
You may want to look at a couple of things to help you answer your own question: In the zephyr folders; \boards\arm\bbc_microbit\board.hIt has the list of defines and corresponding pins The other useful information would be a clear view of the actual physical pins: https://tech.microbit.org/hardware/edgeconnector/I'm sure you will be able to make some progress with this info. Billy..
|
||||||||||||||
|
||||||||||||||
Civetweb together with MQTT
Jan Pohanka
Hello, I would like to use web server together with MQTT in same project. Unfortunately civetweb sample and MQTT sample have conflicting config requirements with CONFIG_POSIX_API and CONFIG_NET_SOCKETS_POSIX_NAMES. What would be the right settings here? best regards Jan
|
||||||||||||||
|
||||||||||||||
API meeting: agenda
Carles Cufi
Hi all,
This week we will look at: - PWM, USB and clock_control APIs in the context of stable APIs - PR: https://github.com/zephyrproject-rtos/zephyr/pull/20657 - PR: https://github.com/zephyrproject-rtos/zephyr/pull/20375 - PR: https://github.com/zephyrproject-rtos/zephyr/issues/20806 - Doc for stable APIs: https://docs.zephyrproject.org/latest/development_process/api_lifecycle.html#stable - GPIO: Update on progress - Look at the PRs with driver conversion (https://github.com/zephyrproject-rtos/zephyr/issues/18530) - Check users of GPIO APIs: https://github.com/zephyrproject-rtos/zephyr/issues/20017 - Tips for converting users can be found here: https://github.com/zephyrproject-rtos/zephyr/issues/20017#issuecomment-549315497 (thanks Peter!) - Any additional outstanding PRs to topic-gpio Additional items in the "Triage" column in the GitHub project may be discussed if time permits. If you want an item included in the meeting, please add it to the GitHub project. https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion https://github.com/zephyrproject-rtos/zephyr/projects/18 https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit Regards, Carles
|
||||||||||||||
|
||||||||||||||
Re: Errors generated when build a sample using clang6.0
#west
Kumar Gala
On Nov 25, 2019, at 9:49 PM, istuoli@163.com wrote:llvm/clang isn’t supported for ARM SoCs. - k
|
||||||||||||||
|
||||||||||||||
Errors generated when build a sample using clang6.0
#west
istuoli@...
Hello!
I want to build samples/subsys/power/device_pm using clang6.0 so I do as follows: 1、export ZEPHYR_TOOLCHAIN_VARIANT=llvm 2、mkdir build and cd build 3、cmake -DBOARD=reel_board .. 4、make Then, I got some errors: [ 95%] Linking C executable zephyr_prebuilt.elf clang-6.0: warning: argument unused during compilation: '--specs=nosys.specs' [-Wunused-command-line-argument]
clang-6.0: warning: argument unused during compilation: '-u _OffsetAbsSyms' [-Wunused-command-line-argument]
clang-6.0: warning: argument unused during compilation: '-u _ConfigAbsSyms' [-Wunused-command-line-argument]
clang-6.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
/usr/local/bin/ld.lld: error: linker.cmd:189: { expected, but got ALIGN_WITH_INPUT
>>> _bt_channels_area : ALIGN_WITH_INPUT SUBALIGN(4)
>>> ^
clang-6.0: error: ld.lld command failed with exit code 1 (use -v to see invocation)
zephyr/CMakeFiles/zephyr_prebuilt.dir/build.make:101: recipe for target 'zephyr/zephyr_prebuilt.elf' failed
make[2]: *** [zephyr/zephyr_prebuilt.elf] Error 1
CMakeFiles/Makefile2:557: recipe for target 'zephyr/CMakeFiles/zephyr_prebuilt.dir/all' failed
make[1]: *** [zephyr/CMakeFiles/zephyr_prebuilt.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2 Then I turn to west and do: west build -b reel_board .. Some similar errors were generated: [127/132] Linking C executable zephyr/zephyr_prebuilt.elf
FAILED: zephyr/zephyr_prebuilt.elf
: && ccache /usr/local/bin/clang --target=arm-none-eabi --specs=nosys.specs zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj -o zephyr/zephyr_prebuilt.elf -Wl,-T zephyr/linker.cmd -Wl,-Map=/home/lt/zephyrproject/zephyr/samples/subsys/power/device_pm/build/zephyr/zephyr_prebuilt.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/libarch__arm__core.a zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a zephyr/arch/arch/arm/core/cortex_m/mpu/libarch__arm__core__cortex_m__mpu.a zephyr/lib/libc/minimal/liblib__libc__minimal.a zephyr/lib/posix/liblib__posix.a zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a zephyr/boards/arm/reel_board/libboards__arm__reel_board.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/i2c/libdrivers__i2c.a zephyr/drivers/serial/libdrivers__serial.a modules/nordic/lib..__modules__hal__nordic.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -L"/usr/lib/gcc/x86_64-linux-gnu/7.4.0" -L/home/lt/zephyrproject/zephyr/samples/subsys/power/device_pm/build/zephyr -lgcc -fshort-enums -mthumb -mcpu=cortex-m4 -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-section=alignment -u_OffsetAbsSyms -u_ConfigAbsSyms -nostdlib -static -no-pie -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -mabi=aapcs -march=armv7e-m && :
clang-6.0: warning: argument unused during compilation: '--specs=nosys.specs' [-Wunused-command-line-argument]
clang-6.0: warning: argument unused during compilation: '-u _OffsetAbsSyms' [-Wunused-command-line-argument]
clang-6.0: warning: argument unused during compilation: '-u _ConfigAbsSyms' [-Wunused-command-line-argument]
clang-6.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
/usr/local/bin/ld.lld: error: zephyr/linker.cmd:189: { expected, but got ALIGN_WITH_INPUT
>>> _bt_channels_area : ALIGN_WITH_INPUT SUBALIGN(4)
>>> ^
clang-6.0: error: ld.lld command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/lt/zephyrproject/zephyr/samples/subsys/power/device_pm/build
Thanks a lot!
|
||||||||||||||
|
||||||||||||||
Help with porting to the new GPIO API
Carles Cufi
Hi all,
As you might know there is a new GPIO API under development in the topic-gpio branch. All drivers should now be ported but the actual users of the GPIO API, which are spread all over the tree, need porting. The following issue tracks progress with porting those users: https://github.com/zephyrproject-rtos/zephyr/issues/20017 Our plan is to make the new GPIO API the default for Zephyr 2.2, but in order to achieve that we need to port all users of the API first. * If you are already assigned to porting one or more users in the issue above, please consider submitting a PR against topic-gpio as early as you can * If you know the code for any of the unassigned users, or want to learn more about the new GPIO API, feel free to assign yourself (send me an email and I will update the issue) and work on a PR You can find useful tips for porting to the new API in this comment: https://github.com/zephyrproject-rtos/zephyr/issues/20017#issuecomment-549315497 Feel free to reply to this email or join the #gpio channel on Slack if you have questions. Thanks in advance! Carles
|
||||||||||||||
|
||||||||||||||
Building MCUBoot with a DTS overlay file
Hello:
I am not sure if this issue should be asked here, or in the MCUBoot mailing list, but I will start by asking here.
I want to change the partitions in my nrf52840, this is easy when building a zephyr system, I simply put an overlay file with my new partition table in the project directory, cmake finds it and uses it, and all is good. I tried the same thing when building mcuboot, it doesn’t work, although it looks like it should work.
I downloaded the latest mcuboot code from JuulLabs ‘git clone https://github.com/JuulLabs-OSS/mcuboot.git’. And after running the appropriate mcuboot setup scripts I built mcuboot for zephyr. In the project directory mcuboot/boot/zephyr I ran ‘west build -b nrf52840_mdk’, the build completes west flash is successful and the bootloader is running on the board as expected. Now I want to change the partition table (and of course the keys). I created a file nrf52840_mdk.overlay in the mcuboot/boot/zephyr directory (I also tried putting the overlay in the boards subdirectory):
&flash0 { /* * For more information, see: * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions */ partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>;
boot_partition: partition@0 { label = "mcuboot"; reg = <0x000000000 0x0000C000>; }; slot0_partition: partition@c000 { label = "image-0"; reg = <0x0000C000 0x000067000>; }; slot1_partition: partition@73000 { label = "image-1"; reg = <0x00073000 0x000067000>; }; scratch_partition: partition@da000 { label = "image-scratch"; reg = <0x000da000 0x0001c000>; }; blob_partition: partition@f7000 { label = "image-blob"; reg = <0x000f7000 0x00001000>; };
/* * The flash starting at 0x000f8000 and ending at (32kB) * 0x000fffff is reserved for use by the application. */
/* Storage partition will be used by FCB/NFFS/NVS if enabled. */ storage_partition: partition@f8000 { label = "storage"; reg = <0x000f8000 0x00008000>; }; }; };
As you can see this is almost exactly the same as the standard partitions except the scratch partition is 4k smaller, and I have added a 4k blob partition. When I compile this and attempt to flash the code, the code goes into the wrong partition, because the dts.overlay file is ignored.
The CMakelists.txt file looks reasonable, it should overlay the dts.overlay AND the nrf52840_mdk.overlay when building the dts file, but it doesn’t actually end up with two overlays.
I tried numerous combinations of adding an overlay or two on the west command line, but I couldn’t get it to work. west build -b nrf52840_mdk -- -DDTC_OVERLAY_FILE=”whatever”
I eventually added the contents of the dts.overlay file to my nrf52840_mdk.overlay, and I commented out part of the CMakeLists.txt file to make it work, but I don’t think this is the right way to do it:
# Add a common dts overlay necessary to ensure mcuboot is linked into, # and fits inside, the boot partition. (If the user specified a # DTC_OVERLAY_FILE on the CMake command line, we need to append onto # the list). #if(DTC_OVERLAY_FILE) # set(DTC_OVERLAY_FILE # "${DTC_OVERLAY_FILE} ${CMAKE_CURRENT_LIST_DIR}/dts.overlay" # CACHE STRING "" FORCE # ) #else() # set(DTC_OVERLAY_FILE ${CMAKE_CURRENT_LIST_DIR}/dts.overlay) #endif()
if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}.overlay) set(DTC_OVERLAY_FILE "${DTC_OVERLAY_FILE} ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}.overlay" CACHE STRING "" FORCE ) endif()
What is the right way to get two overlays into the mcuboot build?
Lawrence King Principal Developer Connected Transport Market Unit +1(416)627-7302
CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.
|
||||||||||||||
|
||||||||||||||
BBC-Microbit PIR sensor
#zephyrbluetoothmesh
#sensor
#ble
#bluetoothmesh
#gpio
Daniel Fox <danny.fox97@...>
Hi All,
Im currently working on my 3rd year engineering project and I need some help/guidance as I'm a complete beginner. My project is a home monitoring system and my plan is to use PIR motion sensors inside the house, using Bluetooth mesh. I have a few BBC Microbits and I have managed to implement the Mesh demo example from zephyr v1.14. My plan is to try and replace the switch functions (button_pressed .. etc) to allow the motion sensor connected to GPIO PIN 0 on the BBC micro bit board. So when motion is detected it would act like how the button press function works on the boards. My issue is I'm not sure how to program this and read the GPIO 0 pin, I want something like if motion sensor = 1 send messaged to light LED to other BBC micro bits. If motion sensor=0 do nothing. From the microbit.c file: #define BUZZER_PIN EXT_P0_GPIO_PIN // replace buzzer_pin with motion sensor ??? static void button_pressed(struct device *dev, struct gpio_callback *cb,
u32_t pins)
{
struct mb_display *disp = mb_display_get();
if (pins & BIT(SW0_GPIO_PIN)) {
k_work_submit(&button_work);
} else {
u16_t target = board_set_target();
if (target > 0x0009) {
mb_display_print(disp, MB_DISPLAY_MODE_SINGLE,
K_SECONDS(2), "A");
} else {
mb_display_print(disp, MB_DISPLAY_MODE_SINGLE,
K_SECONDS(2), "%X", (target & 0xf));
}
}
}
void board_play_tune(const char *str)
{
while (*str) {
u32_t period, duration = 0U;
while (*str && !isdigit((unsigned char)*str)) {
str++;
}
while (isdigit((unsigned char)*str)) {
duration *= 10U;
duration += *str - '0';
str++;
}
if (!*str) {
break;
}
if (str[1] == '#') {
period = get_period(*str, true);
str += 2;
} else {
period = get_period(*str, false);
str++;
}
if (period) {
pwm_pin_set_usec(pwm, BUZZER_PIN, period, period / 2U);
}
k_sleep(duration);
/* Disable the PWM */
pwm_pin_set_usec(pwm, BUZZER_PIN, 0, 0);
}
}
.....
static void configure_button(void)
{
static struct gpio_callback button_cb;
k_work_init(&button_work, button_send_pressed);
gpio = device_get_binding(SW0_GPIO_CONTROLLER);
gpio_pin_configure(gpio, SW0_GPIO_PIN,
(GPIO_DIR_IN | GPIO_INT | GPIO_INT_EDGE |
GPIO_INT_ACTIVE_LOW));
gpio_pin_configure(gpio, SW1_GPIO_PIN,
(GPIO_DIR_IN | GPIO_INT | GPIO_INT_EDGE |
GPIO_INT_ACTIVE_LOW));
gpio_init_callback(&button_cb, button_pressed,
BIT(SW0_GPIO_PIN) | BIT(SW1_GPIO_PIN));
gpio_add_callback(gpio, &button_cb);
gpio_pin_enable_callback(gpio, SW0_GPIO_PIN);
gpio_pin_enable_callback(gpio, SW1_GPIO_PIN);
}
|
||||||||||||||
|
||||||||||||||
I think you need a few more things turned on in your config file. To figure out what you need turned on I always use the menuconfig tool and diff the old and new .config files, then I take the changes and pit them in my prj.conf file
In this case I ran ‘ninja menuconfig’ in the build directory, turned on SPI, then CANBUS, then MCP25625, here is a diff between zephyr/.config.old and zephyr/.config:
> CONFIG_SPI=y 678a679,695 > # CONFIG_SPI_ASYNC is not set > # CONFIG_SPI_SLAVE is not set > CONFIG_SPI_INIT_PRIORITY=70 > # CONFIG_SPI_LOG_LEVEL_OFF is not set > # CONFIG_SPI_LOG_LEVEL_ERR is not set > # CONFIG_SPI_LOG_LEVEL_WRN is not set > CONFIG_SPI_LOG_LEVEL_INF=y > # CONFIG_SPI_LOG_LEVEL_DBG is not set > CONFIG_SPI_LOG_LEVEL=3 > # CONFIG_SPI_0 is not set > # CONFIG_SPI_1 is not set > # CONFIG_SPI_2 is not set > # CONFIG_SPI_3 is not set > # CONFIG_SPI_4 is not set > # CONFIG_SPI_5 is not set > # CONFIG_SPI_6 is not set > CONFIG_SPI_NRFX=y 749a767,768 > # CONFIG_SPI_NOR is not set > # CONFIG_SPI_FLASH_W25QXXDV is not set 760c779,797 < # CONFIG_CAN is not set --- > CONFIG_CAN=y > # CONFIG_CAN_LOG_LEVEL_OFF is not set > # CONFIG_CAN_LOG_LEVEL_ERR is not set > # CONFIG_CAN_LOG_LEVEL_WRN is not set > CONFIG_CAN_LOG_LEVEL_INF=y > # CONFIG_CAN_LOG_LEVEL_DBG is not set > CONFIG_CAN_LOG_LEVEL=3 > CONFIG_CAN_INIT_PRIORITY=80 > CONFIG_CAN_WORKQ_FRAMES_BUF_CNT=4 > CONFIG_CAN_0=y > CONFIG_CAN_1=y > CONFIG_CAN_MCP2515=y > CONFIG_CAN_MCP2515_OSC_FREQ=8000000 > CONFIG_CAN_MCP2515_INT_THREAD_STACK_SIZE=512 > CONFIG_CAN_MCP2515_INT_THREAD_PRIO=2 > CONFIG_CAN_MCP2515_MAX_FILTER=5 > CONFIG_CAN_MCP2515_INIT_PRIORITY=80 > # CONFIG_CAN_LOOPBACK is not set > # CONFIG_CAN_NET is not set
My guess is you are not finding the SPI bus because you haven’t configured it.
Lawrence King Principal Developer +1(416)627-7302
From: users@... <users@...>
On Behalf Of christophhintz@...
Sent: Tuesday, November 19, 2019 5:19 AM To: users@... Subject: [Zephyr-users] MCP2515 with nRF52832 using zephyr #dts #nrf52832
Hi I had a question to setup the MCP2515 driver in the zephyr project. We made a custom board for the decawave DWM1001 module, which uses a nRF52832 chip. They have a device tree file in the zephyr project for this module, so I started with that device tree and configured it for our setup, which is
. I attached the devicetree and project file to this post.
|
||||||||||||||
|
||||||||||||||
About PSE completeness
Claudio Scordino <c.scordino@...>
Dear all, I'd like to know if there is already a schedule about reaching PSE51 or PSE52 completeness (as far as I've understood, only subsets of such standards are currently implemented). Thanks. Claudio
|
||||||||||||||
|
||||||||||||||
API meeting: agenda
Carles Cufi
Hi all,
This week we will look at: - PWM: Add support for inverted PWM signals - PR: https://github.com/zephyrproject-rtos/zephyr/pull/20657 - GPIO: Update on progress - Look at the PRs with driver conversion (https://github.com/zephyrproject-rtos/zephyr/issues/18530) - Check users of GPIO APIs: https://github.com/zephyrproject-rtos/zephyr/issues/20017 - Tips for converting users can be found here: https://github.com/zephyrproject-rtos/zephyr/issues/20017#issuecomment-549315497 (thanks Peter!) - Any additional outstanding PRs to topic-gpio Additional items in the "Triage" column in the GitHub project may be discussed if time permits. If you want an item included in the meeting, please add it to the GitHub project. https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion https://github.com/zephyrproject-rtos/zephyr/projects/18 https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit Regards, Carles
|
||||||||||||||
|
||||||||||||||
christophhintz@...
Hi I had a question to setup the MCP2515 driver in the zephyr project. We made a custom board for the decawave DWM1001 module, which uses a nRF52832 chip. They have a device tree file in the zephyr project for this module, so I started with that device tree and configured it for our setup, which is
. I attached the devicetree and project file to this post.
|
||||||||||||||
|
||||||||||||||
Re: #stm32 pinmux.c compile failure STM32F407
#stm32
Erwan Gouriou
Hi Neo I'd advise you to have a look to STM32 clock control driver. It provides MCO support. It might not provide exactly the requested configuration, but at least it would be a working point that you can custom to your own need. Erwan
On Fri, 8 Nov 2019 at 18:28, <nanjunneo@...> wrote:
|
||||||||||||||
|
||||||||||||||
Tomorrow's API meeting: Agenda
Carles Cufi
Hi all,
This week we will look at: - QSPI/jedec API proposal vs SPI API extension: - https://github.com/zephyrproject-rtos/zephyr/pull/20069 vs - https://github.com/zephyrproject-rtos/zephyr/pull/20564 - GPIO: Update on progress - Look at the PRs with driver conversion (https://github.com/zephyrproject-rtos/zephyr/issues/18530) - Check users of GPIO APIs: https://github.com/zephyrproject-rtos/zephyr/issues/20017 - Tips for converting users can be found here: https://github.com/zephyrproject-rtos/zephyr/issues/20017#issuecomment-549315497 (thanks Peter!) - Any additional outstanding PRs to topic-gpio Additional items in the "Triage" column in the GitHub project may be discussed if time permits. If you want an item included in the meeting, please add it to the GitHub project. https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion https://github.com/zephyrproject-rtos/zephyr/projects/18 https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit Regards, Carles
|
||||||||||||||
|
||||||||||||||
#stm32 pinmux.c compile failure STM32F407
#stm32
nanjunneo@...
Hello guys,
for the board STM32F407 I want to add pin PA8 25 MHz clk output to Etherent Phy. So that I add the following sentence (1) HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSE, RCC_MCODIV_1) into the pinmux.c.
The rest of code in pinmux.c I copied from stm32f4_dico, except I configure OTG_HS_DM / OTG_HS_DP as virtual port.
The compiling fails at the last step: `HAL_GPIO_Init' is not defined.
[129/134] Linking C executable zephyr/zephyr_prebuilt.elf
FAILED: zephyr/zephyr_prebuilt.elf .....
.....
/home/neo/ARM-GCC-Toolchain/gcc-arm-none-eabi-8-2019-q3-update-linux/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: modules/stm32/stm32cube/lib..__modules__hal__stm32__stm32cube.a(stm32f4xx_hal_rcc.c.obj): in function `HAL_RCC_MCOConfig':/home/neo/zephyr_2_0_99/zephyrproject/modules/hal/stm32/stm32cube/stm32f4xx/drivers/src/stm32f4xx_hal_rcc.c:769: undefined reference to `HAL_GPIO_Init' /home/neo/ARM-GCC-Toolchain/gcc-arm-none-eabi-8-2019-q3-update-linux/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /home/neo/zephyr_2_0_99/zephyrproject/modules/hal/stm32/stm32cube/stm32f4xx/drivers/src/stm32f4xx_hal_rcc.c:793: undefined reference to `HAL_GPIO_Init' collect2: error: ld returned 1 exit status The pinmux.c is attaced here. the compile is successful without adding the sentence(1).
Do you have any idea? or how can I check it further?
Thank you!
------------------------------------------------------pinmux.c in board file-----------------------------------------------------------------
#include <kernel.h>
#include <device.h> #include <init.h> #include <drivers/pinmux.h> #include <sys/sys_io.h> #include "stm32f4xx.h" #include <pinmux/stm32/pinmux_stm32.h> /* pin assignments for STM32F4DISCOVERY board */ static const struct pin_config pinconf[] = { #ifdef CONFIG_UART_1
{STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_USART1_RX}, #endif /* CONFIG_UART_1 */ #ifdef CONFIG_UART_2
{STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif /* CONFIG_UART_2 */ #ifdef CONFIG_PWM_STM32_2
{STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1}, #endif /* CONFIG_PWM_STM32_2 */ #ifdef CONFIG_USB_DC_STM32
{ STM32_PIN_PB14, STM32F4_PINMUX_FUNC_PB14_OTG_HS_DM }, { STM32_PIN_PB15, STM32F4_PINMUX_FUNC_PB15_OTG_HS_DP }, #endif /* CONFIG_USB_DC_STM32 */ }; static int pinmux_stm32_init(struct device *port) { ARG_UNUSED(port); HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSE, RCC_MCODIV_1); ----------------------------------------------------------------------(1) stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf)); return 0; } SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); Best regards,
Neo
|
||||||||||||||
|
||||||||||||||
Re: OpenOCD on STM32 boards
Hi Marti:
toggle quoted messageShow quoted text
Thanks, setting the udev rules did the trick. Just so other people know what to do: $ sudo cp ${HOME}/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/share/openocd/contrib/60-openocd.rules /etc/udev/rules.d/ $ sudo udevadm control --reload-rules $ sudo usermod -aG plugdev $USER Hi Charles: This probably should be added somewhere in the 'Getting Started' guide after the Zephyr SDK is installed. It should also be made clear that you don't need to use the compilers in the SDK, but you do need to install the SDK (see the first half of this thread) to get the working version of openocd. I had also put in the rules for pyOCD but these are part of the instructions from pyOCD: $ git clone https://github.com/mbedmicro/pyOCD.git $ sudo cp pyOCD/udev/*.rules /etc/udev/rules.d $ sudo udevadm control --reload $ sudo udevadm trigger Lawrence King Principal Developer +1(416)627-7302
-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@nordicsemi.no> Sent: Tuesday, November 5, 2019 5:51 PM To: Lawrence King <lawrence.king@irdeto.com>; Zephyr-users@lists.zephyrproject.org Cc: users@lists.zephyrproject.org Subject: RE: [Zephyr-users] OpenOCD on STM32 boards Lawrence King <lawrence.king@irdeto.com> writes: Hi Marti:Sure thing! ^^ judging from this, my guess is you need some udev rules to make the USB device accessible to your user. Marti Error: open failed
|
||||||||||||||
|
||||||||||||||
Re: Shell over WebUSB
Andrei
Hi Markus,
On Thu, Nov 07, 2019 at 07:59:02AM +0000, Becker Markus wrote: Hi,Yes, I had some dirty hacks working, never went upstream, the JS part is still here: https://github.com/finikorg/webusb-zephyr-demo I saw that the webusb.c/.h files are in the samples directory. Is itwebusb defines interface with 2 endpoints just for tests, to put it to class we need some Spec. Probably for the shell you could implement subsys/shell/shell_webusb.c similar to shell_telnet.c or shell_uart.c. We can probably create also third endpoint for logs and have special log screen... I have created issue for that: https://github.com/zephyrproject-rtos/zephyr/issues/20409 Best regards Andrei Emeltchenko
|
||||||||||||||
|