No, the Python code initializes the output port as per documentation:
import streams
streams.serial()
print("It works!")
On the other hand, a “printf” from a .c
file doesn’t work:
#include "zerynth.h"
#include "g350_debug.h"
#include "g350.h"
//DEBUG0("This doesn't work.");
vbl_printf_stdout("This doesn't neither");
Commenting out vbl_printf_stdout()
If a guard the C routine with a couple of print("before")
and print("after")
, after
is printed if and only if I comment out the vbl_printf_stdout()
line. It means to me the routine is fine and vbl_printf_stdout()
crashes the program.
vbl_printf_stdout
is found
If I comment out the line NATIVE_UNWARN()
, I get the following compilation warning:
pointer targets in passing argument 1 of 'vbl_printf_stdout' differ in signedness [-Wpointer-sign]
which means the declaration of vbl_printf_stdout
is found by the compiler.
Compiler version
I discovered that Zerynth compiles with the GCC version I installed in my system under /usr/bin/
. Even if I change my $PATH
and compile via ztc compile
, I get the same result: vbl_printf_stdout()
crashes.
Testing environemnt
I’m working with a Mikroe Quail board.
Any help is appreciated because I’m stuck at this point.