p-net icon indicating copy to clipboard operation
p-net copied to clipboard

stm32

Open Tahe97 opened this issue 3 years ago • 16 comments
trafficstars

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 ?

Tahe97 avatar Apr 04 '22 07:04 Tahe97

Hi! Please see the newly updated documentation on https://rt-labs.com/docs/p-net/getting_started_freertos.html

pyhys avatar Apr 05 '22 06:04 pyhys

ahh okaay Sir i will try it and give you the result

Tahe97 avatar Apr 05 '22 07:04 Tahe97

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

Tahe97 avatar Apr 05 '22 11:04 Tahe97

What kind of error message do you get?

pyhys avatar Apr 06 '22 09:04 pyhys

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".

Tahe97 avatar Apr 06 '22 10:04 Tahe97

the same msg for the second command also CPU=cortex-m7fd BOARD=STM32F767ZI-NUCLEO CUBE_DIR=/home/pi/stm32/STM32CubeF7 cmake

-G Unix Makefiles

Tahe97 avatar Apr 06 '22 10:04 Tahe97

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.

pyhys avatar Apr 06 '22 11:04 pyhys

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)

Tahe97 avatar Apr 06 '22 14:04 Tahe97

Which operating system do you run the commands on? Do you get any error messages? Have you tried loading the file to your board?

pyhys avatar Apr 08 '22 07:04 pyhys

  • 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 .

Tahe97 avatar Apr 08 '22 07:04 Tahe97

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.

pyhys avatar Apr 08 '22 12:04 pyhys

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?

pyhys avatar Apr 08 '22 14:04 pyhys

I tried to install virtual machine and working on it is that ok ?

Tahe97 avatar Apr 08 '22 16:04 Tahe97

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

Tahe97 avatar Apr 27 '22 12:04 Tahe97

An Exsample Build In Keil or IAR for STM32 is the best

SolarPeng2022 avatar May 01 '22 00:05 SolarPeng2022

I build p-net in Keil5. Feel free to get it. https://github.com/andre-lost-a-pig/p-net-stm32

andre-lost-a-pig avatar Feb 09 '23 09:02 andre-lost-a-pig

Closing due to inactivity. Please reopen if necessary.

pyhys avatar Apr 23 '24 12:04 pyhys