Silvio
Silvio
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
https://github.com/silvio-vallorani-zephyr-portfolio/usermode_gpio_test/ This is a functioning sample I need to add CONFIG_MPU=y to prj.conf and grant access for user thread to the gpio "port" object I tried to grant gpio.port before, but without CONFIG_MPU=y... resulting in hardfault Then i add CONFIG_MPU=y but grant access to gpio object... resulting in permission error Finally I tried with both and boom Anyway i need to use CONFIG_NO_OPTIMIZATIONS=y to debug step by step inside the syscalls...
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
solved. thank you very much for your time!
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
yup I follow his suggestion but I noticed that there is a permission error
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
if I remove the k_object_access_grant(&dbg_pin1, usermode_thread); the program goes in static inline int z_vrfy_gpio_port_toggle_bits(const struct device port, gpio_port_pins_t pins) { K_OOPS(K_SYSCALL_DRIVER_GPIO(port, port_toggle_bits)); <-- and finally in / LCOV_EXCL_START / FUNC_NORETURN __weak void arch_system_halt(unsigned int reason) { ARG_UNUSED(reason); / TODO: What's the best way to totally halt the system if SMP * is enabled? / (void)arch_irq_lock(); for (;;) { / Spin endlessly */ } } with reason == 3
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
Here are my tries: https://github.com/silvio-vallorani-zephyr-portfolio/usermode_gpio_test/ -> 3 branches, one for each approach
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
same behaviour
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
the main thread isn`t a supervisor thread?
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
unfortunately can`t find a sample for that
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
i am pretty sure that is the GPIO
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
No description
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
Compiling... Then I'll attach the hardfault status
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
Anyway I read that in usermode threads can use syscalls... And gpio api should be syscalls... 😵‍💫
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
Just forwarded in stm32 channel!
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
I wrote in memory protection channel...
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
I can. In my opinion i need to place the gpio descriptor in a memory section that have user access and/or give the user access to the memory area in which the gpio registers are mapped... But i am new in user space and searching for a guidance...
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
Hi melta, have you made any attempts?
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
Sorry i need to go now, i can be on again in about 2h
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
-b nucleo_f401re
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
Yup
59 replies
DIIDevHeads IoT Integration Server
Created by Silvio on 12/29/2024 in #middleware-and-os
Zephyr and userspace
Oh sorry
59 replies