Using sprintf in mikroSDK projects

Fully featured ARM compilers available on Windows, Linux, and macOS.
Post Reply
Author
Message
kkanjuh.kingict
Posts: 6
Joined: 23 Nov 2021 14:04

Using sprintf in mikroSDK projects

#1 Post by kkanjuh.kingict » 15 Jan 2022 14:26

Hi,

Is it possible to I use sprintf method in mikroSDK projects? When I add below configuration in memake.txt, editor recognize sprintf method but when I try to compile, I get error

Code: Select all

Call signature does not match the function definition signature 'isdigit'

Code: Select all

binaries:{
    __Lib_Sprintf.emcl    
}
Regards

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Using sprintf in mikroSDK projects

#2 Post by filip » 17 Jan 2022 10:20

Hi,

Can you please attach a project that demonstrates this issue ?

Regards,
Filip.

kkanjuh.kingict
Posts: 6
Joined: 23 Nov 2021 14:04

Re: Using sprintf in mikroSDK projects

#3 Post by kkanjuh.kingict » 17 Jan 2022 10:28

Hi,

I attach sample project.

Regards,
Kruno
Attachments
IoTtest.zip
(22.93 KiB) Downloaded 99 times

frank.malik
Posts: 96
Joined: 09 Apr 2021 20:37

Re: Using sprintf in mikroSDK projects

#4 Post by frank.malik » 30 Oct 2022 08:33

Hello kkanjuh.kingict, hello Filip,

I hope you don't mind if I hitchhike this thread and post my question here, which is actually the same.
After a long journey of different approaches to implement a sprintf support in the current version of Necto Studio,
including some code from the net, and modifing the printf function from the log implementation, I also tried
to include a legacy library.

As I'm working with the mikromedia 3 for PIC32MZ, I had to use the __Lib_Sprintf_EF from the legacy version v4.0.0,
which seems to be the only one made for this series of processors. I found it here NECTOStudio\sdk\legacy\v4.0.0\bin\MICROAPTIV_FP\__Lib_Sprintf_EF.

After another struggle and jumping over hurdles of the Cmake definitions, it seems that I finally found the correct combination.
However, in the end it's a Cul-de-Sac, as I get the same error message and can't progress any further:

Code: Select all

Call signature does not match the function definition signature 'isdigit'
The project for Necto Studio 2.3.0. is attached.
Attachments
Test_sprintf_lib.zip
(16.58 KiB) Downloaded 84 times
Kind regards
Frank

Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Using sprintf in mikroSDK projects

#5 Post by filip » 04 Nov 2022 17:22

Hi,

I will prepare the solution for this and get back ASAP.

Regards,
Filip.

AntiMember
Posts: 136
Joined: 02 Jan 2020 19:00

Re: Using sprintf in mikroSDK projects

#6 Post by AntiMember » 08 Nov 2022 10:28

While the global solution is being prepared ... it may work like that ?
I don't have a microSDK to check...
Added Frank's changes.
Attachments
Test_sprintf_lib.zip
(18.1 KiB) Downloaded 88 times
Last edited by AntiMember on 08 Nov 2022 14:48, edited 1 time in total.

frank.malik
Posts: 96
Joined: 09 Apr 2021 20:37

Re: Using sprintf in mikroSDK projects

#7 Post by frank.malik » 08 Nov 2022 12:12

Hello AntiMember,

thank you very much for your kind help.
Changing the libraries on binary level is an interesting approach.

I tried it with my project, but unfortunately I still get an error message:

Code: Select all

Call signature does not match the function definition signature 'isdigit'
I even changed the call to the settings in the documentation

Code: Select all

unsigned int isdigi1( char character );
but still no luck. Maybe there is another position in the library file that needs to be changed,
as the error message still shows "isdigit", but should show "isdigi1", as you have changed this.

I have to wait for Filip and his solution.
Anyway, thank you very much for taking care and at least try something.
Kind regards
Frank

Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2

frank.malik
Posts: 96
Joined: 09 Apr 2021 20:37

Re: Using sprintf in mikroSDK projects

#8 Post by frank.malik » 08 Nov 2022 12:15

Hmm,

I changed another "isdigit" to "isdigi1", and at least the error message is gone.
Let's see if it works, too.
Kind regards
Frank

Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2

frank.malik
Posts: 96
Joined: 09 Apr 2021 20:37

Re: Using sprintf in mikroSDK projects

#9 Post by frank.malik » 08 Nov 2022 12:51

Hello AntiMember,

it works!

Thanks very much for your hint and help.

I will further test the different parameter settings for sprintf, but basically I have a solution now to continue.

Have a nice day.
Kind regards
Frank

Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2

AntiMember
Posts: 136
Joined: 02 Jan 2020 19:00

Re: Using sprintf in mikroSDK projects

#10 Post by AntiMember » 08 Nov 2022 14:17

Hello Frank.
It's nice to help someone who knows how to bring a decision to the end.
Good luck!

Post Reply

Return to “ARM AI Compilers”