Need extras_stdlib.h file to support ultoa() function for Classic/Legacy CodeWarrior

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need extras_stdlib.h file to support ultoa() function for Classic/Legacy CodeWarrior

Jump to solution
1,283 Views
alanraphael
Contributor I

I am trying to revive an old CodeWarrior HC08 V5.1 project written by someone else using the Development Studio for Microcontrollers V6.3.   I am having compilation issues because the old project used the c function ultoa() which requires the extras_stdlib.h  file.   However I am unable to locate this file anywhere either within the archive of the original V5.1 installation or the installation of V6.3 on my computer.  I can also not find this file anywhere on the Freescale website or anywhere on the web.  Also are there any other source files needed such as extras_stdlib.c?


The CodeWarrior help system also mentions the _MSL_NEEDS_EXTRAS macro in relation to extras_stdlib.h, but I don't know if this is relevant to my situation.

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
955 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Alan,

You can find the __ewl_strrev() function in the file "file_io.c", this file and its header are located on these paths:

- C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.3\ColdFire_Support\ewl\EWL_C\src\file_io.c

- C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.3\ColdFire_Support\ewl\EWL_C\include\file_io.h

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

View solution in original post

0 Kudos
Reply
4 Replies
955 Views
alanraphael
Contributor I

I moved this post to the Classic/Legacy CodeWarrior space for better visibility.  As explained in my previous response, I copied extras.c and extras.h from Jorge Gonzalez's referenced directories into my own project, but then got a whole set of new compile errors.  I thought of just extracting the ultoa() code from extras.c directly into my source program, but I noticed it referenced a function called __ewl_strrev() which I can not find information on anywhere.

I inherited this project from another engineer who developed it on CodeWarrior V5.1.  I tried unsuccessfully to compile it under the original version copied to a new computer and when that failed, downloaded an evaluation version of  CodeWarrior V6.3 and had similar issues.  I am a hardware guy and not a programmer so I am trying to keep this effort as simple as possible since the original project consisted of only a handful of files targeted at a MC9S08QG8 in the 16 pin dip.  The goal is to work with the USBMULTILINKBDM pod.

Any advice here to handle the ultoa() issue as simple as possible?

0 Kudos
Reply
956 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Alan,

You can find the __ewl_strrev() function in the file "file_io.c", this file and its header are located on these paths:

- C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.3\ColdFire_Support\ewl\EWL_C\src\file_io.c

- C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.3\ColdFire_Support\ewl\EWL_C\include\file_io.h

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 Kudos
Reply
955 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Alan:

What target device are you using? Is this CW v6.3 for MCU or CW v6.3 for Coldfire?

The built EWL libraries do not include extended functions, but I think the source is provided so you can 1) Rebuild the libraries or 2) Include the source file + header file in your project and build.

In my case with CodeWarrior for MCUs v6.3, I found the ultoa() function in the file "extras.c". The relevant files are in these paths:

- C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.3\ColdFire_Support\ewl\EWL_C\src\extras\extras.c

- C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.3\ColdFire_Support\ewl\EWL_C\include\extras\extras.h

So you can copy "extras.c" and "extras.h" to your project to have that function.

PS. Please always post to a specialized space, such as Classic/Legacy CodeWarrior, otherwise your question has very low visibility for the community.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

954 Views
alanraphael
Contributor I

Jorge,

Thanks, I am using CW v6.3 for MCU and I did find the files you referenced.  However when I copied them directly to my project, I got a bunch of new compile errors because the extras.c and extras.h both include (reference) a number of other .h files also in the extras directory which I really don't need.  Do I need to copy all the other files also or is there another way to reference those directories in the project.  My other option is to just extract the ultoa() code and copy it into the file which calls the routine.

0 Kudos
Reply