Linker Error Not Reported in 'Problems' View

I’m adding stuff to a Project, and I did a build to check that what I have so far builds OK.
I knew that I’d referenced a function that I haven’t written yet - so I expected an “undefined reference” error.

But the ‘Problems’ View showed “0 items” :open_mouth: :exclamation:

When I checked in the ‘Console’ view, the error was there - as expected:

So why did that not appear in the ‘Problems’ view?! :open_mouth:

Does this mean that the ‘Problems’ view cannot be trusted? :angry:

The linker output seems a bit strange… usually, the linker prints a reference to the source file location where the error has occured…

e.g.

Maybe that’s why the error parser is confused…
Is the source/object file (from where you reference the non-existing function) “special”?

The “undefined reference” was actually in the Task Table - like this:

const adl_InitTasks_t adl_InitTasks [] =
{
{ MainTask, 3*1024, "MAIN", 3 },    // Main task
{ SubTask1, 3*1024, "SUB1", 2 },    // Sub task 1
{ SubTask2, 3*1024, "SUB2", 1 },    // Sub task 2
{ NULL, 0, NULL, 0 }
};

So there isn’t an actual “call” to the function.

Maybe that’s what confuses it?

Still a bug in the parser, though.

I just made a quick try, and I have the same issue: it’s true that’s confusing to have an unsuccessful build without errors reported visually on the project explorer!

By the way, about the task table management, do you know the Code generation feature?
By right-clicking on your project > Open AT > Generate Code, it opens a specific editor where you can setup your task table, and it generates the code for you…

Mine just says, “The chosen operation is not enabled”. :frowning:

So how do I enable it :question:

Maybe you’ve made the try on a project depending on an Open AT OS version older than 6.X (the one from which multitasking is supported…)?

No - I had just clicked on a Project that was not the Active project! :blush:

The message could be clearer, though; eg,

But, even when I do it on the Active project, I just get a blank form. :frowning:
Does this mean that it can’t be used to update an existing project that was started “manually”?

Well, yes and no…
It doesn’t parse existing code to extract Task Table information.
But you can browse to point on your existing functions in order to generate a new Task Table (and don’t forget to delete the old one, to avoid a “multiply defined link” error).

Sorry, I don’t get what you mean by that :confused:

Ok, let’s go for a quick tutorial :wink:

  • In the editor, enable the task table
  • Add a new task
  • It will propose you to create a new function or to browse for an existing one: just browse to your function
  • Just add a name and the call stack size
  • And repeat for all your tasks…

By the way, note that by double-clicking on the table line (once created), it will open the source code editor to show the task entry point.

That is, the Code Generation editor.

I don’t find it immediately obvious how to “enable the task table”; when I see a button labelled ‘Generate Task Table’, I take that to mean that pressing it will cause a Task Table to be generated.
If its function is to enable the GUI facility, it should say that.

There is also an ambiguity about whether “the task table” refers to the list in the GUI, or the table (array) that is generated in the source code…

Ah - there’s the catch: I didn’t want to add a new task, so I didn’t consider the ‘new task’ button!

The secret of really good GUI design is to make it really clear and obvious what each element of the GUI does, while at the same time not getting too verbose and/or cluttered as to obscure things!

But why can’t it just find the existing Task Table? It has to be called adl_InitTasks - so it should be easy to find!
Similarly for the Interrupt Handler stack sizes, wm_apmIRQLowLevelStackSize and wm_apmIRQHighLevelStackSize

Maybe a ‘Search’ button could be added to the form to find potential entries for all the GUI tables, and the user could then choose which one(s) to use…?

We’ve logged your points for integration in a future release:

  • Clarification of the UI
  • Propose/Automatically perform a detection of the already defined application settings in the source code

Thanks.

:smiley: Thanks! :smiley:

One more: Is it possible to change the name of the generated files?
“generated.c” and “generated.h” aren’t really very informative…

Also logged: the capability to configure the output filenames.

Thanks.

But not yet implemented in 1.1.1 :question:

Back to the original subject of Linker Messages, I think it would be helpful if Linker messages were somehow distinguished from Compiler messages in the ‘Problems’ view…

Especially as the messages can be listed in the wrong order in the ‘Problems’ view…

Small addition to my answer in the other topic: in the Configure Contents… dialog of the Problems View, you can define new configurations, e.g. to list only “undefined reference” problems.

That’s not what I was after.

I still want all the messages, but I want it to be clear which ones are Compiler messages, and which are Linker messages.

See: viewtopic.php?f=78&t=4298

In that case, a source file location is given - but the ‘Problems’ view still doesn’t handle it properly!

It seems like the error parser has a number of problems with the Linker output…?