Extension - Bug (missing .S files and subfolders)


#1

When a new extension is added the contents of extension’s .zip file are placed in
%appdata%\Roaming\com.makeblock.Scratch3.4.10\Local Store\mBlock\libraries\EXTENSIONNAME\

When the “Edit with IDE” button is clicked, all *.h and *.cpp files are copied from the \scr folder to a new project folder.
Some projects require an assembly file *.S - these do not get copied, and thus compiling fails.

Also, some more complicated libraries have sub-folders and these do not get copied either.


#2

Hi DashX,

Do you refered to this instruction to add the extension to mBlock software?
Besides, which version mBlock software do you use and what is the system of your Computer?


#3

Hi,

Yes, I have used those instructions. The extension installs and works correctly.
I am using mBlock v 3.4.10 on windows

The problem is that mBlock is only programmed to copy *.h and *.cpp files to the temp project directory for compiling.
It also needs to copy .S files (assembly language files). As some Arduino libraries include assembly files (.S) for compiling.

The second problem is it doesn’t copy sub folders from the extension’s folder to the temp folder, again some arduino libraries have include files in sub folders.

Every time you click “Upload to Arduino” or “Edit in IDE” files are copied (by mBlock) from
%appdata%\Roaming\com.makeblock.Scratch3.4.10\Local Store\mBlock\libraries\EXTENSIONNAME\src(*.h & *.cpp)
to
%appdata%\Roaming\com.makeblock.Scratch3.4.10\Local Store\scratchTemp\project_MBLOCKFILENAME\

Can you please add *.s and subfolder copy in the next release.

Thanks
Mike


#4

Hi,

Good suggestion! We are working on the next gen of mBlock, hoping it will have more extension capabilities.

Would you please tell me that which / what kind of library have .s files or sub folders? Or what do you want to make when this is available?

Thanks,

Yu


#5

I’m also running into this. Using 3.4.12 on Windows. Trying to make an extension for FastLED library for use with NeoPixel strip. But it looks like subdirectories in the src folder aren’t being loaded, just like the OP was dealing with.

github for FastLED: https://github.com/FastLED/FastLED

Compilation error (same in Arduino IDE and mBlock console, and as you can see in github, the requested file does exist, but is in the platforms/avr subdirectory):
In file included from C:\Users\Simon\AppData\Local\Temp\build8870756054751554390.tmp\FastLED.h:41:0,
from C:\Users\Simon\AppData\Local\Temp\build8870756054751554390.tmp\bitswap.cpp:2:
C:\Users\Simon\AppData\Local\Temp\build8870756054751554390.tmp\led_sysdefs.h:34:43: fatal error: platforms/avr/led_sysdefs_avr.h: No such file or directory
#include “platforms/avr/led_sysdefs_avr.h”
^
compilation terminated.
Error compiling.