Author Topic: Libopencm3 Issue (STM32)  (Read 699 times)

0 Members and 1 Guest are viewing this topic.

Offline jnestor481

  • Newbie
  • Posts: 3
  • Country: us
Libopencm3 Issue (STM32)
« on: August 04, 2019, 08:26:33 pm »
Hello everyone,

Completely new to all this. Engineering student who is trying to learn about microcontrollers. Have to confess I'm not the most computer savy person out there. In fact I think they usually turn into a huge time sink of IT issues. So here I am.

I bought a book called Beginning STM32 by Warren Gay. I have followed all the instructions as best I could. I downloaded Cygwin, libopencm3, FreeRTOS (10.2.1), and the ARM cross compiler. I am stuck at this command line prompt that he gives:
line 1: $ cd ~/stm32
line 2: make

At first I couldn't use the 'make' command but I fixed that by reinstalling Cygwin with it included. Then it was an issue with Python, but same fix just reinstalled Cygwin. Now I get the following error message and I'm unsure what to do. I try my best to fix my own problems but hitting my head against a brick wall on this one.

make -C libopencm3 TARGETS=stm32/f1
make[1]: Entering directory '/cygdrive/c/Users/Joe/AppData/Roaming/SPB_Data/stm32/libopencm3'
GENHDR include/libopencm3/stm32/f1/irq.json
/bin/sh: ./scripts/irq2nvic_h: /usr/bin/env: bad interpreter: Permission denied
make[1]: *** [Makefile:61: include/libopencm3/stm32/f1/irq.json.genhdr] Error 126
make[1]: Leaving directory '/cygdrive/c/Users/Joe/AppData/Roaming/SPB_Data/stm32/libopencm3'
make: *** [Makefile:38: libopencm3/lib/libopencm3_stm32f1.a] Error 2

I have tried searching for an older version of libopencm3 like the book suggested but did not have any luck.
Any help would be hugely appreciated. Thank you.
 

Online andersm

  • Super Contributor
  • ***
  • Posts: 1156
  • Country: fi
Re: Libopencm3 Issue (STM32)
« Reply #1 on: August 04, 2019, 09:33:00 pm »
I suspect that the irq2nvic_h Python script is not marked as executable, because you downloaded the libopencm3 sources outside the Cygwin environment.

If you want to use Cygwin, the only way to stay sane is to stay completely within the Cygwin environment, and never try mixing it and "native" Windows. MinGW/MSYS2 provide better interoperability with Windows apps, and there's fully native versions of Python. If you're on a recent version of Windows 10, you could also go the other way and install the Windows Subsystem for Linux.

Offline amiq

  • Regular Contributor
  • *
  • Posts: 120
  • Country: scotland
Re: Libopencm3 Issue (STM32)
« Reply #2 on: August 28, 2019, 06:02:10 am »
libopencm3 will not build on cygwin - you'll have to compile in the msys environment.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf