Hi Martin
1) I have just updated the user's guide since it was for the uTasker V1.3 [
http://www.utasker.com/docs/uTasker/uTaskerV1.4_user_guide.PDF ]. There are a couple of slight changes in V1.4 which caused your problem 2. In addition I added the
#include "config.h" to the example code.
Note that the code to the tutorial is available for copying at
http://www.utasker.com/forum/index.php?topic=541.0, where I also adjusted it to suit V1.4 (with a couple of comments in case someone still tries using it with V1.3)
2) The
fnDebugDec() routine changed in use between V1.3 and V1.4. This is explained here:
http://www.utasker.com/forum/index.php?topic=641.0. Note that the string functions are fully documented in the code-documentation (not all is...) at
http://www.utasker.com/docs/Code.html [open "Operating System, the "String output and Conversion"]
3) The new user's guide now shows two techniques for assigning the COM port to the simulator:
#define SERIAL_PORT_0 '3' // if we open UART channel 0 we simulate using com3 on the PCor
#define SIM_COM_EXTENDED // this uses the value literally and not the ASCII value, which otherwise restricts to COM1..9
#define SERIAL_PORT_0 3 // if we open UART channel 0 we simulate using com3 on the PCBoth are valid but the second one (using also the define
SIM_COM_EXTENDED) allows higher COM port number (especially useful with USB COM ports since they often have quite high numbers). The method with the COM port number represented as ASCII should only be used without the define. It is more for backward compatibility before the extended range was added and is limited to COM 1..9.
4) I don't think that any extra instructions are required apart from changing the 3 to 2 above. It should be all that is needed; just make sure that UART0 is really being opened in the project and then
#define SERIAL_PORT_0 2 should do it (together with
SIM_COM_EXTENDED of course).
GCC build:undefined reference to `fnMyFirstTask' means that the linker didn't find this routine. You are right that it is because your new file hasn't been added to the build yet.
To avoid problems you could also simply add your new task's code to an existing file (eg. at the bottom of
application.c).
But to solve it properly you need to add your file to the make file as follows:
1) Open
make_uTaskerV1.4_GNU_LPC23XX2) Add your file to the list of objects (either on a new line as below or in an existing line):
OBJS = Build/application.o Build/debug.o Build/webInterface.o Build/KeyScan.o Build/GLCD.o Build/LCD.o Build/TFT.o Build/NetworkIndicator.o \
Build/myNewFile.o \
Build/startup_gnu.o Build/LPC23XX.o \
Build/MODBUS.o Build/modbus_app.o \
Build/eth_drv.o Build/Driver.o Build/uMalloc.o Build/uTasker.o Build/Tty_drv.o Build/iic_drv.o Build/uFile.o Build/Watchdog.o Build/GlobalTimer.o Build/low_power.o \
Build/Ethernet.o Build/arp.o Build/dhcp.o Build/dns.o Build/ftp.o Build/http.o Build/icmp.o Build/ip_utils.o Build/ip.o Build/pop3.o Build/smtp.o \
Build/tcp.o Build/telnet.o Build/tftp.o Build/udp.o Build/webutils.o Build/NetBIOS.o3) Add the compiler instruction by copying an similar existing one:
like
Build/webInterface.o: ../webInterface.c $(DEPENDS) ../application.h
$(CC) $(C_FLAGS) $(INC) $(OPTS) ../webInterface.c -o Build/webInterface.oand changing it to suit
Build/myNewFile.o: ../myNewFile.c $(DEPENDS)
$(CC) $(C_FLAGS) $(INC) $(OPTS) ../myNewFile.c -o Build/myNewFile.o{
Note that I have removed the application.h dependency in this case but specific headers can be added if the C-file should be rebuild when it/they change}
That should already do it.
Note that the GCC make files as used are quite simple - there are methods to effectively automate everything but it is beyond me how it works... but it is generally also no problem to just add files when you need to and keeps it simple enough that also I more or less understand what is going on.
Note that I didn't add this to the user's guide since it is compiler specific. This thread can be used as reference for additional questions or by others needing such advice.
Thanks for the feedback and good luck
Regards
Mark