evidence / erika3

ERIKA Enterprise v3 RTOS
http://www.erika-enterprise.com
Other
223 stars 96 forks source link

Syntax error in generated ee_applcfg.c #8

Closed wentasah closed 1 year ago

wentasah commented 1 year ago

Greetings to all Erika developers :-) I'm not sure whether Erika is still supported or not, but I at least try.

We're experimenting with TriCore support. When conf.oil contains CPU_DATA for multiple CPUs but some CPUs don't have any TASK or COUNTER assigned to them, then the generated ee_applcfg.c cannot be compiled.

The problematic part in ee_applcfg.c is:

static CONSTP2VAR(OsEE_TDB, OS_CONST, OS_APPL_DATA)
  osEE_tdb_ptr_array[OSEE_TASK_ARRAY_SIZE + OsNumberOfCores] =
{
  &osEE_tdb_array_core0[0U],
  &osEE_tdb_array_core0[1U],
  &osEE_tdb_array_core0[2U],
,
,
  &osEE_tdb_array_core0[3U],
  &osEE_tdb_array_core1[0U],
  &osEE_tdb_array_core2[0U]
};

The syntax error is reported at the location of two commas.

The problem can be reproduced with this conf.oil.

If some tasks are assigned to CPUs 1 and 2, the code can be compiled successfully.

cc @Darth-Bujar

eguidieri commented 1 year ago

Hi Michal,

this version of Erika will be resumed, ask Paolo for details, I don't know if I can write something here...

About your problem, I want to say that I don't understand the use case, why turn on a core without any "computational element" (TASK) configurated, it is just wasted power...

Saying that for us this is not a valid configuration.

Bye, Errico :)

pj1974 commented 1 year ago

Dear Michal,

I hope you are fine!

As Errico said, the scenario has likely not been tested, because it does not make much sense to configure a core that you are not going to use. We'll check it in detail in the future.

...in the meantime, please allocate a dummy task to the unused cores...

Note that ERIKA3 will have a number of (good) changes soon, that will likely be announced later on next year... But I cannot tell anything until it will get official confirmation.

Ciao,

PJ

Il 06/12/2022 13:17, Michal Sojka ha scritto:

Greetings to all Erika developers :-) I'm not sure whether Erika is still supported or not, but I at least try.

We're experimenting with TriCore support. When |conf.oil| contains |CPU_DATA| for multiple CPUs but some CPUs don't have any |TASK| or |COUNTER| assigned to them, then the generated |ee_applcfg.c| cannot be compiled.

The problematic part in |ee_applcfg.c| is:

static CONSTP2VAR(OsEE_TDB, OS_CONST, OS_APPL_DATA) osEE_tdb_ptr_array[OSEE_TASK_ARRAY_SIZE + OsNumberOfCores] = { &osEE_tdb_array_core0[0U], &osEE_tdb_array_core0[1U], &osEE_tdb_array_core0[2U], , , &osEE_tdb_array_core0[3U], &osEE_tdb_array_core1[0U], &osEE_tdb_array_core2[0U] };

The syntax error is reported at the location of two commas.

The problem can be reproduced with this conf.oil https://github.com/Darth-Bujar/examples_erika/blob/9dae866687f221c759322822ddc20e544276f39d/invalid%20file%20generations%20examples/tc38_led/ee/conf.oil.

If some tasks are assigned to CPUs 1 and 2, the code can be compiled successfully.

cc @Darth-Bujar https://github.com/Darth-Bujar

— Reply to this email directly, view it on GitHub https://github.com/evidence/erika3/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLUSUZDECSDZ5OOB7SRP73WL4VGRANCNFSM6AAAAAASVN4WN4. You are receiving this because you are subscribed to this thread.Message ID: @.***>

wentasah commented 1 year ago

Thanks for quick answers. I'm happy that Erika development will be resumed.

As to my use case. I agree that it makes little sense to start a CPU without any task. We're currently getting familiar with Erika, doing various experiments. During this, when we commented a task in conf.oil, we were surprised by the errors. Now, it's clear what and why happens, but it took us some time to understand what's going on. If RT-Druid reports an error instead of generating uncompilable code, things would be easier for newcomers.

pj1974 commented 1 year ago

Dear Micha,

I agree, RT-Druid should not have generated code non compliant. likely we never hit that issue in our regression tests in the past... therefore the warning check was not implemented.

Ciao,

PJ

Il 06/12/2022 16:15, Michal Sojka ha scritto:

Thanks for quick answers. I'm happy that Erika development will be resumed.

As to my use case. I agree that it makes little sense to start a CPU without any task. We're currently getting familiar with Erika, doing various experiments. During this, when we commented a task in conf.oil, we were surprised by the errors. Now, it's clear what and why happens, but it took us some time to understand what's going on. If RT-Druid reports an error instead of generating uncompilable code, things would be easier for newcomers.

— Reply to this email directly, view it on GitHub https://github.com/evidence/erika3/issues/8#issuecomment-1339536442, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLUSU7RMGZKXFZGNIYJX6TWL5KCTANCNFSM6AAAAAASVN4WN4. You are receiving this because you commented.Message ID: @.***>