Sorry, in an SSP 1.1.x project the heap is set to 0KB for an S1 project by default.
RE: S1 - snprintf does not work with float.
RE: S1 - snprintf does not work with float.
I would also make sure the stack size for the caller thread is set to at least 1k when using newlib-nano (2k with default newlib). If you're running out of memory you can push "main stack" on the BSP tab down to 1k (0x400)
RE: fx_file_open fails to open file
Hello Laser,
What is the value of the status variable - it usually gives away what is wrong with the function call. Once you pause the project when it's trapped at while(1), you can hover over "status" to see its value.
Regards
RE: Some errors during compilation with NetX + USBX project
Hello Alex,
You do not need to include bsp_api, tx_port & etc. - they are included through xxx_thread.h file. ux_utility.h is also not necessary to implement on the application level. The errors you are seeing are semantic errors generated by Eclipse codan (code analyzer). Contents of the header files that define VOID or UINT have not been indexed, hence you're seeing the problems. If you build the project however, the compiler won't report any issues. You can manually rebuild the index to remove these warnings by right-clicking your project in the Project Explorer pane and selecting Index -> Rebuild.
Regards
RE: Suggestion for Synergy Configuration enhancement
Hello Laboratori,
This limitation is imposed by the framework, not the driver. Framework has a dependency on the driver, but not on its specific setup (I'm not sure this can be implemented in the configurator as no other frameworks do that). Ideally the ADC Periodic Framework would be improved to bypass that limitation.
Regards
Suggestion for Synergy Configuration enhancement
Two days ago I had a problem when configuring the ADC Periodic Framework using the Synergy Configuration tool. I tried to acquire simultaneously some normal analog channels plus the internal temperature sensor value and it resulted in an run time error which, as Karol pointed, is because an incompatibility listed in the written documentation of the SSP.
My suggestion is that, in the same way it is done with the pin assignments, all the known peripheral incompatibilities should be taken into account by the Synergy Configurator and warn the user, otherwise one of the main advantages of using the configurator is lost, because we also have to read very carefuly every single line of the documentation before changing the properties of a driver or a framework.
RE: fx_file_open fails to open file
Hi Karol,
the value of status is 24 (decimal)
RE: S1 - snprintf does not work with float.
"Merging" your replies I have been able to solve the problem :-).
Sergey: Yes, you are right. My mistake. However the problem was still present.
Jeremy: Enabling the newlib-nano with floating support (and enabling some heap!! Probably this is the core of the problem) solved the issue! Thank you.
As a side question, how did you see the heap usage?
Karol: I had 1k of stack in the dummy project. But thank you for the "main stack" reducton trick!
RE: S1 - snprintf does not work with float.
For a GNU project, synergy provides it own _sbrk() function, that is called by the C runtime library when memory from the heap needs to be allocated. This is located in synergy/ssp/src/bsp/mcu/allbs_sbrk.c
RE: S1 - snprintf does not work with float.
Very interesting, thank you Jeremy!
S1 - snprintf does not work with float.
Hello,
i am working with a project on a S1 MCU and I figured out that the "snprintf" function does not work with float.
Try this dummy code:
#include "new_thread0.h"
#include "stdio.h"
void new_thread0_entry(void);
/* New Thread entry function */
void new_thread0_entry(void)
{
char tmp[100];
while (1)
{
float a = 25.2;
snprintf( tmp, 100, "%f4.2", a );
tx_thread_sleep (1);
}
}
The resulting "tmp" array is completly wrong.
Am i doing anything wrong?
RE: Some errors during compilation with NetX + USBX project
Hi Karol,
First, thank you for your reply. I deleted bsp_api, tx_port and ux_utility, then I rebuild the project but I already have the same errors and another likes "redefinition of '_fxe_file_read'", "redefinition of '_fxe_file_close'", "conflicting types for '_fxe_file_open'", etc...
I have some errors on fx_api.h likes " conflicting types for 'FX_LOCAL_PATH' " too.
I get this errors because I include #include "ux_host_class_storage.h"
RE: fx_file_open fails to open file
Hello Laser,
24 decimal is FX_PTR_ERROR (pointer error). You'll have to check that &g_fx_media0 and &g_my_file are valid pointers and that media is opened and initialized before calling fx_file_open. What is the type for g_fx_media0 and g_my_file?
Regards
RE: Some errors during compilation with NetX + USBX project
Hello Alex,
This happens because even though you've specified NX_HTTP_NO_FILEX to use filex_stub.h, the ux_host_class_storage.h still pulls in fx_api.h, providing new prototypes for the functions declared by filex_stub.h.
You can either remove NX_HTTP_NO_FILEX from compiler preprocessor defines (in the project properties), or define UX_NO_FILEX in the same place.
Regards
Some errors during compilation with NetX + USBX project
Hi all,
I have a projet with a NetX Webserver with which I display live video streaming by the camera of the Synergy DK card, and all of this works fine.
Now, I would like to use USBX to add some applications on this project. Just to begin with a functional application, I tried to add the demo available on the Renesas website: USBX_Mass_Storage_Host_DK-S7G2.
Next, I have complete some files like demo_nx_http_application.c on my basic project to make run the USB demo with my basic project.
First error:
- When I include "#include " ux_host_class_storage.h" " in demo_nx_http_application.c, I have many errors "type UINT could not be resolved". But if I don't include it, I have the error "_ux_host_class_storage_entry undeclared" but it's normal because I need ux_host_class_storage.h for it. So how can I resolved the UINT problem please ?
- In an automatically generate file called ux_device_class_storage.h, some variable are declared in VOID, but VOID is not define in this file. We have #define VOID void but in another file. And like it's a generate file, I can't modify by myself VOID into void or include the #define VOID void, so how can I resolve it please ?
Another information if it can help, my basic project works on SSP 1.1.3 and the USB demo works with SSP 1.1.0, do you think it could be that ?
Thanks in advance,
Alex
RE: fx_file_open fails to open file
RE: fx_file_open fails to open file
Hello Laser,
What does the g_my_file link to? In the most examples it's creates as static variable. If you're linking it externally it should be present somewhere else. Also, are you closing the file before opening it again? Simple file handling is part of my USBX Mass Storage Host example you can find in the following thread: renesasrulz.com/.../6523.aspx (post from 25th of May).
Regards
fx_file_open fails to open file
Hi,
in my application I have a file.dat stored on the eMMC. Sometimes I need to update the records inside that file, but the fx_file_open operations fails. My code is:
UINT status;
char fileName[] = "file.dat";
status = fx_file_open(&g_fx_media0, &g_my_file, (CHAR *)fileName, FX_OPEN_FOR_WRITE);
if (FX_SUCCESS != status)
{
while(1);
}
the status variable is not equal to FX_SUCCESS and the execution blocks inside the while(1) cycle. Anyone has any idea of what am I doing wrong? Perhaps have I to open that file with different options (i.e. append, etc..).
I'm working with SSP 1.1.0.
Thank you!
ThreadX Defines You Might be Wondering About
Here are three ThreadX Defines you might find if you did deep into the code.
Two of the three defines are tool related and specific to IAR and GHS tools. They are documented in the associated readme_threadx.txt file supplied with the specific port.The EPK define is part of an add-on utility and not part of the base ThreadX distribution. Hence, it is not defined inside the ThreadX User Guide. In the future, EPK will become part of the standard distribution and thus the define will be added to the ThreadX User Guide.
TX_ENABLE_EVENT_LOGGING is a legacy feature valid only for the Green Hills MULTI environment and shouldn't be used in other cases.
TX_ENABLE_IAR_LIBRARY_SUPPORT is defined when the IAR compiler and libraries are used, it is specific to the port and valid only in that context. When IAR is used it is defined, otherwise not.
TX_ENABLE_EPK_SUPPORT enables Execution Profiler Kit capabilities.
RE: Enable NetX Socket ADDR_REUSE Flag
I am having the same issue. Once in a while I can connect, send a packet, get the response, and close the connection. When it works, I can repeat this every 10 seconds for a while, then suddenly I get 0x38 on socket_connect. No amount of disconnecting will make it work. Any solutions? If it helps at all, I have an internal server that I test it with and it seems to work all the time every time. The one outside is the problem.