p-net
p-net copied to clipboard
stm32
good morning Sir , trying to understand this exemple i find some folders about stm32 so i'm asking if we use cmake with the stm32 IDE do you think that will work with stm32 board ?
Hi! Please see the newly updated documentation on https://rt-labs.com/docs/p-net/getting_started_freertos.html
ahh okaay Sir i will try it and give you the result
i tried to do this tuto but i think that i have a problem in this two commands :
DCMAKE_TOOLCHAIN_FILE=cmake/tools/toolchain/stm32cube.cmake \
G "Unix Makefiles"
I tried to do every command independly
i m confused about CUBE_DIR =" /path/to/cube " i put the path of the placement where i clonned the STM32Cube firmware
What kind of error message do you get?
it s to long but this what i get in the first command
-DCMAKE_TOOLCHAIN_FILE=cmake/tools/toolchain/stm32cube.cmake
the result -->
pi@raspberrypi:~/stm32/p-net $ CPU=cortex-m7fd BOARD=STM32F767ZI-NUCLEO CUBE_DIR=/home/pi/stm32/STM32CubeF7 cmake \
-DCMAKE_TOOLCHAIN_FILE=cmake/tools/toolchain/stm32cube.cmake CMake Warning: No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases.
-- The C compiler identification is unknown -- The CXX compiler identification is unknown -- The ASM compiler identification is unknown -- Didn't find assembler CMake Error at cmake/tools/Platform/STM32Cube.cmake:18 (enable_language): No CMAKE_ASM_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH. Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/CMakeSystemSpecificInformation.cmake:26 (include) CMakeLists.txt:19 (project)
-- Warning: Did not find file Compiler/-ASM CMake Error at CMakeLists.txt:19 (project): The CMAKE_C_COMPILER:
arm-none-eabi-gcc
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:19 (project): The CMAKE_CXX_COMPILER:
arm-none-eabi-gcc
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred! See also "/home/pi/stm32/p-net/CMakeFiles/CMakeOutput.log". See also "/home/pi/stm32/p-net/CMakeFiles/CMakeError.log".
the same msg for the second command also
CPU=cortex-m7fd BOARD=STM32F767ZI-NUCLEO CUBE_DIR=/home/pi/stm32/STM32CubeF7 cmake
-G Unix Makefiles
Note that it is just two commands. The first is:
CPU=cortex-m7fd BOARD=STM32F769I-DISCO CUBE_DIR=/path/to/cube cmake -B build.cube -DCMAKE_TOOLCHAIN_FILE=cmake/tools/toolchain/stm32cube.cmake -G "Unix Makefiles"
and the seconds is
cmake --build build.cube
Note that cmake is called in both lines. In the first are three environmental variables set before executing cmake.
Modify the value of CUBE_DIR to point to the correct directory.
I have solved this problem it was in the CUBE_DIR path but unfortunately after building i didn't find build.cube/pn_dev.bin only an executable file named pn_dev (type : XMLspy)
Which operating system do you run the commands on? Do you get any error messages? Have you tried loading the file to your board?
- i'm working on raspberry pi 4 .
- i have the error that i have printed in this msg
https://github.com/rtlabs-com/p-net/issues/483#issuecomment-1090109741
- yes i tried to change the name of pn_dev (type : xmlspy) on pn_dev.bin and i upload it but i have no changes unfortunately .
It seems that you are missing the ARM cross compiler. Install it with:
sudo apt install gcc-arm-none-eabi
I will improve the documentation in future releases.
It might actually be difficult to compile the software on a Raspberry Pi, as it also is an ARM processor. The toolchain is for cross compiling, which means compiling for an ARM processor on a X86 processor. Do you have access to a Linux laptop?
I tried to install virtual machine and working on it is that ok ?
good morning pyhys , i'm still working on the same project, i tried to apply the existing code on STM32'IDE . i made some changes and the code compiled without errors but i have encountered a problem in sample_app file mainly in the `app_loop_forever module, there weren't any verified coditions. i would be grateful if you could help
An Exsample Build In Keil or IAR for STM32 is the best
I build p-net in Keil5. Feel free to get it. https://github.com/andre-lost-a-pig/p-net-stm32
Closing due to inactivity. Please reopen if necessary.