Code from non-event blocks not being added to the code generated by mBlock


#1

I have a custom board that I’m trying to program with mBlock. I created a new device loosely following this tutorial (https://www.mblock.cc/doc/en/developer-documentation/tutorials/add-arduino.html). When I preview it, only the code from my event block shows up in the Arduino C code generated by mBlock. Not even the default blocks show up in the generated code. I tried uploading a program containing a custom block with code that should’ve caused an error when compiled, but it uploaded just fine. I downloaded the dev mode package and imported it to the mBlock 5 desktop app, but had the same results.

Here are my custom blocks:
image
image
image
image

Transcode settings (didn’t modify the default code):
image
image
image
image

Default Arduino C code generated by mBlock:
image

Adding an event block works correctly:
image

When I add any block that isn’t an event block, nothing is added to the generated code. It uploads just fine, even though the code in the preview block should throw errors (I didn’t declare L_DIR, R_DIR, L, and R anywhere).
image