Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Error "Couldn't reserve space for cygwin's heap, Win32 error 0" after SW4STM32 update

Windows 10

SW4STM32
After last update 201701121612 got error messages:

C:\Design\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.13.0.201701121612\tools\make\echo.exe: *** Couldn’t reserve space for cygwin’s heap, Win32 error 0
C:\Design\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.13.0.201701121612\tools\make\sh.exe: *** Couldn’t reserve space for cygwin’s heap, Win32 error 0
for all my projects :-(

How to get rid of them? Is it possible to get back to the previous version, whatever it is?

Hmm, reverted installation. Installed the last update again and these errors disappeared.

Hi Chudik,
Please, may you provide more details? Do you get these errors at comilation or debug phase?
It seems issues are triggered with the V1.13, might be better to keep using V1.12 for the moment.


Hello.

I am getting the exact same error. I am using System Workbench V2.0.
Version: Neon.3 Release (4.6.3)
Build id: 20170314-1500

It happens during the build. It is not always, only about 50% of the cases.
When it happens, I just build again and then it usually passes in the end. But this is still annoying.
In fact, I am using a computer where only 50% of the RAM is used, with 16 GBytes of RAM so the problem should not be related to a real lack of memory.

I wonder if there is not a problem with very fast disks. I am using an SSD disk and maybe when it is too fast some files are generated in a wrong timing.
You can try to reproduce this especially with the STM32CubeF4 example located here:
STM32Cube_FW_F4_V1.16.0\Projects\STM32F429I-Discovery\Applications\FatFs\FatFs_USBDisk\SW4STM32\STM32F429I-DISCO

No need of any hardware to see this.

Thank you if you can provide any fix for that.


Now it even won’t compile anymore, because this error comes all the time, even after several build one after the other (unlike previously).

This is the detailed error:

Finished building: C:/STM32Cube_FW_F4_V1.16.0/Drivers/BSP/STM32F429I-Discovery/stm32f429i_discovery.c

main us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x60EA0000, RegionSize 0x10000, State 0x10000
C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.13.2.201705091103\tools\make\echo.exe: *** Couldn’t reserve space for cygwin’s heap, Win32 error 0
make: *** Application/User/main.o Error 1

15:01:28 Build Finished (took 11s.48ms)

How can I switch back to version V1.12 as you state, shall I install an old version of SW4STM32 or can I use this V1.12 compiler with SW4STM32 V2.0, and how to install (what plugin, etc...)?

Thanks.


I come back about this problem to provide some update.

There is a good explanation of the problem and why this happens here:
https://stackoverflow.com/questions/18502999/git-extensions-win32-error-487-couldnt-reserve-space-for-cygwins-heap-win32Question

Especially post “Install 64-bit Git for Windows 2” suggests that we should use MSYS2 instead of MSYS1 that SW4STM32 seems to be using, to get rid of that problem the clean way.

Another solution, which is clumsy, is to remap the msys-1.0.dll file this way on my computer:

C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.13.2.20
1705091103\tools\make>”c:\program files\Microsoft SDKs\Windows\v6.0A\bin\x64\reb
ase.exe” -b 0x70000000 msys-1.0.dll

You can try remaping to 0x50000000 or 0x70000000 or whatever else. You need to do that only once.
It seemws to help a little bit at first, but in fact I still have to build the project up to 20 times until it is successful, which is a nightmare.
Else, once the build is ok I have all features working perfectly, with debug and everything else working great. So sad that this problem remains..

Do you know if it is soon planned to do this move to MSYS2 so that this error would be fixed? Or any other solution to provide?


Hello.
I think this problem is very serious. I doubt that I am the only one having this issue.
Is SW4STM32 handling this for the next version?

By the way, I am using Windows 7 64 bits. Also, I have installed Cygwin64.


Hello there,
Got the same error when trying to install current version 2.0 on Windows 10 with an SDD. No previous version was installed before.


I am getting this error having just installed SW4STM32 v2.0.

It happens on a ‘clean’ of the Project:

18:09:29 **** Clean-only build of configuration Debug for project L4_DAC_ADC ****
make -j4 clean 
rm -rf *
      0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x60EA0000, RegionSize 0x430000, State 0x10000
C:\bin\Ac6\SW4STM32_200\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.13.2.201705091103\tools\make\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
make: [clean] Error 1 (ignored)
 

18:09:29 Build Finished (took 143ms)

As the linked StackOverflow article suggested, a system restart stopped that crash.

But then I got a different crash part way through a build.

I just repeated the build, and it completed without crashing.

This whole thing is looking rather flaky...

frown


I think I have been able to solve the issue using MSYS2 library instead of MSYS1 as I was suggesting SW4STM32 to do.

Here is the procedure I applied:

• Install the MSYS2 library for Windows: http://www.msys2.org/Question
• Open the make tool directory from SW4STM32. It should be located in a directory like the following:
C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.13.2.201705091103\tools\make
Browse until there to discover the real name of the directory on your computer or search for the “make.exe” file.
• Do a copy of that folder first somewhere else, like “make_orig”
• Replace the following files from the MSYS2 library into the “make” directory above. Take them from the “C:\msys64\usr\bin” directory:
- echo.exe
- msys-2.0.dll
- msys-iconv-2.dll
- msys-intl-8.dll
- rm.exe
- sh.exe
• Delete the following file from the “make” directory:
- msys-1.0.dll
• Restart SW4STM32 and run a new build of your project after a “clean”.

The error should not appear anymore. I rebuilt the project several times and it doesn’t appear anymore. Also tried several other projects successfully, error didn’t appear a single time.
I am running Windows 7 64bits.
BTW, system restart did not fix it for me.

Please tell if this works and then I hope SW4STM32 would include this fix in their next release.

Hi Dulan,

Thanks to have describe your procedure, this is quite similar to something I tried last week, whitout success...
Looks like the make.exe version 4.2.x for MSYS2 does not work with SW4STM32, which is its version on your side?

Also maybe could you attach an archive of your make directory for those who have troubles with current softwares versions.

Hi Dulan,

I tried your suggestion and it works perfectly. It also seems to improve the average build performance as well. :-)

Before doing this change, I didn’t have the exact same error message as described in earlier posts, but rather a complete crash which caused Windows message boxes to be shown. When reducing parallell builds it improved the situation, but it wasn’t until doing this change as everything seems to work as expected.

I’ve also had issues with the pre-build execution, which also seems to be fixed by doing this. The 1.13.1 toolchains didn’t seem to have the same issue (at least not for mer). I hope they will include a fix for the next toolchain release.

/Peter

One more note on this issue. After doing the suggested change it did work for me. However, if there are any whitespaces in the path during build, it will fail. So there are still issues that must be fixed.

Everything seems to work as expected when using compiler 1.13.1 (1.13.1.201701200843 fr.ac6.feature.mcu.externaltools.armnone.feature.group).

I think I’ll stick with 1.13.1 of System Workbench for now. 2.0 seems to have some quite critical issues to be resolved first.

/Peter


Thanks Dulan, it work for me.

You are welcome jLn_38.
I am using the default make.exe delivered with SW4STM32 version 2.0.1.201705161428. I think this one was gotten by updating the V2.0 through the software’s internal update that I accepted.
With that version, the make.exe contains version 3.81.2520.1772 in the file’s properties.
With this one it works on my side.
I just tried with the make.exe provided by Cygwin64 and it works too (don’t know its version).

Sorry I would not recomment to provide my make directory as it might cause problems when the rest of the libraries are not the same version as your GNU tools (yours will very likely be different than mine as it is not bundled with SW4STM32.

As the version of your make.exe is higher than mine, I would expect it to work.
Please follow the whole procedure above again (exactly), and report what exact error you get. Maybe another executable was not copied properly and generates an error on your side (even only echo.exe)..

Dulan


Dear Forum,
I am getting below error during building the project.
make all
Building file: ../stl/STM32F10x_StdPeriph_Driver/src/misc_.c
Invoking: MCU GCC Compiler
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/make/sh: syntax error: unexpected “(”
stl/STM32F10x_StdPeriph_Driver/src/subdir.mk:84: recipe for target ‘stl/STM32F10x_StdPeriph_Driver/src/misc_.o’ failed
make: *** stl/STM32F10x_StdPeriph_Driver/src/misc_.o Error 2


Please kindly help me to solve above problem.

Are you using ac6 as standalone or plugin inside eclipse? I had the exact same problem a few days ago. I was using ac6 as a plugin. I deleted everything eclipse related and made a clean install of ac6. This solved the problem for me.

I suspect that it may be a conflict in different builders/toolchains but I’m NOT a professional so dont quote me on that! ;)


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs