Author Topic: Adding new task  (Read 3009 times)

Offline Anton

  • Newbie
  • *
  • Posts: 12
    • View Profile
Adding new task
« on: April 30, 2020, 11:41:56 AM »
Hi,

I've been following the uTaskerV1.3_user_guide.PDF attempting to add new task but:

1. ctTaksTable in TaskConfig.h is guarded by OPSYS_CONFIG define which is not defined in my case and therefore the code in between is excluded (I'm building for Utasker Kinetis plus GNU Build). What does it do? `this is only set in the hardware module` is a bit cryptic comment.
2. How should i go about adding a new c file to the project? How should I update make file to reflect this change?

Best Regards,

Anton

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Adding new task
« Reply #1 on: April 30, 2020, 02:54:11 PM »
Hi

1. The content of TaskConfig.h is included by the processor file (eg. kinetis.c or iMX.c, etc.) but the IDEs have difficulties displaying its content as active content. It is however active and you can prove this by adding a syntax error to any additional lines you need to add to the file to verify that it then can't build.
2. if you are working with a stand-alone build you need to add new C files to the make file. Eg. if you are adding a file myNewFile.c (with its own personal header myNewFile.h) you need to make two changes:
a. Add Build/myNewFile.o to the OBJS list
b. in the application files list add a new entry for your file
Build/myNewFile.o: ../myNewFile.c $(DEPENDS) ../myNewFile.h
      $(CC) $(C_FLAGS) $(INC) $(OPTS) ../myNewFile.c -o Build/myNewFile.o


If the new header should influence all files you can instead add it to the DEPENDS list.

Regards

Mark