sorry for this, too.
think have found the second small bug, that had annoyed me in the past too
Now I could catch him at last: here you go:
create an empty makro with string return
you will see this correct line if you export the makro:
Code: Select all
..
<return name='Return' type='T8' description='' isconst='0' isinit='0' usrinit='""' setinit='' >
<array size='20' />
..
you do not know, what the makro is return just in time ( in edit mode )
now duplicate the makro two times and change the return
a) one times:
to byte
you will see this line if you export the makro
we have only a byte - line with the array size is the bug2
Code: Select all
..
<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='""' setinit='' >
<array size='20' />
..
and in c code the return is missing
and works with the pointer technic from the preview string return as parameter..
( see to the last with create a new macro with return byte )
Code: Select all
..
void FCM_cpyReturn_String_change2byte(MX_UINT8 *FCR_RETVAL, MX_UINT16 FCRsz_RETVAL);
..
clean the line with <array size='20' />
b) second times:
no return
you will see this line if you export the makro
we have no return - line with the array size is the bug2
Code: Select all
..
<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' >
<array size='20' />
..
this relict of "<array size='20' />" makes the problem bug3 then in the call makro like you see here:
to do:
same like before,
clean the line with <array size='20' />
FYI:
with certain compiler flags stops the compiler because wrong return sometimes.
btw:
a new created makro with return byte show correct this line
Code: Select all
..
<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
</flowline>
Code: Select all
..
MX_UINT8 FCM_newByteReturn();
..
thanks
best wishes
rudi