Hi Ryan,
I've performed some tests on my side and was not able to reproduce the issue.
Below is my config:
PC -> Win 7 32bit
CodeWarrior for MCU V10.5
MQX V4.0.2
I've created a sample project using the project wizard:
- file + New + MQX 4.0 Project
- Project name: Test
- Select Board: TWRK70F120M Board
- Select application type: New application
- Build Tools Options: GCC
- MQX options: Add MFS support and Add Shell support
- MQX Project type: Empty application
- Add Additional files: NA
- Connections: your connection
- Finish
then a new project is created.
Edit the main.c file and add the code:
+++++++++++++++++++++++
void Main_task(uint_32 initial_data)
{
_io_printf("MQX SSCANF Test V1.0\n");
const uint_8 MAX_STR_LENGTH = 20;
char in[]= "ten 10 10.0";
char label[MAX_STR_LENGTH];
int a=0;
float b=0.0f;
_io_sscanf(in,"%s %d %f", label, a, b);
_io_printf("label = %s\n", label);
_io_printf("a = %d\n", a);
_io_printf("b = %f\n", b);
...
+++++++++++++++++++++++
Now I need to build the MQX libraries for TWRK70F120M board.
Under the MQX installation folder \Freescale_MQX_4_0_2\config\twrk70f120m\cw10gcc, select twrk70f120m.wsd file and drag and drop to Eclipse.
The BSP, MFS, PSP, RTCS, SHELL, USBD and USBH projects are opened.
I've checked the user_config.h and by default the
| #define MQXCFG_ENABLE_FP | 1 |
#define MQX_INCLUDE_FLOATING_POINT_IO 1
I don't changed the config and just rebuild them.
Now I back to the test project and build it.
The project is working fine.
+++++++++++++++++++
**** Build of configuration twrk70f120m_Int_Flash_DDRData_Debug for project test ****
"C:\\Freescale\\CW MCU v10.5\\gnu\\bin\\mingw32-make" -j8 all
'Building file: ../Sources/main.c'
'Executing target #1 ../Sources/main.c'
'Invoking: ARM Ltd Windows GCC C Compiler'
"C:/Freescale/CW MCU v10.5/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "../Sources/main.c" @"Sources/main.args" -Wa,-adhlns="Sources/main.o.lst" -MMD -MP -MF"Sources/main.d" -o"Sources/main.o"
'Finished building: ../Sources/main.c'
' '
'Building target: test.elf'
'Executing target #2 test.elf'
'Invoking: ARM Ltd Windows GCC C Linker'
"C:/Freescale/CW MCU v10.5/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" @"test.args" -o"test.elf"
'Finished building target: test.elf'
' '
+++++++++++++++++++
Attached you will find my project.
If you want to use it, you need to change the paths.
Launch the Project Properties.
Under Resource + Linked Resources.
Hope this will help you.
Regards
Pascal