Some patches for ERIKA v2.8

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Locked
MatzeB.

Some patches for ERIKA v2.8

Post by MatzeB. »

Hi,

during the deployment of my LET project to github, I recognized some problems with ERIKA 2.8 and created some patches. I would like to share this patches with you in order to determine if there is a bug in the code or if I'm just using ERIKA the wrong way :-)
All patches that I have created are for v2.8, downloaded from http://www.erika-enterprise.com/erika-b ... _2.8.0.zip
Test hardware is a Triboard TC2X5 with an TC275ED, hooked up to an Trace32 JTag + PowerTrace

1. MIssing $(LIBS) ./RT-Druid/plugins/com.eu.evidence.ee_2.8.0.20171025_0922/ee_files/pkg/cfg/arch/rules_infineon_tc_generic.mk

Behavior: If you use LIBS ="..."; in your .oil, the parameter is not passed during the ld call. Therefore you get an "undefined reference"

Patch:

Code: Select all

--- ./RT-Druid/plugins/com.eu.evidence.ee_2.8.0.20171025_0922/ee_files/pkg/cfg/arch/rules_infineon_tc_generic.mk	2017-10-25 09:23:24.000000000 +0200
+++ ./RT-Druid/plugins/com.eu.evidence.ee_2.8.0.20171025_0922/ee_files/pkg/cfg/arch/rules_infineon_tc_generic.mk	2017-12-01 14:45:30.636558071 +0100
@@ -260,7 +260,7 @@
 ### Target file creation ###
 $(TARGET_NAME).elf: $(OBJS) $(LIBDEP) $(LINKDEP)
 	@echo "LD $@";
-	$(QUIET)$(EE_LINK) $(OPT_LINK) $(TARGET_LD_FILE) $(OBJS) $(LIBDEP) $(LINK_REDIRECT)
+	$(QUIET)$(EE_LINK) $(OPT_LINK) $(TARGET_LD_FILE) $(OBJS) $(LIBDEP) $(LINK_REDIRECT) $(LIBS)
 	@echo "************************************"
 	@echo "Compilation terminated successfully!"
 
https://github.com/matthiasb85/IDA-LET- ... e-template

2. Generated orti.cmm file does not work ./RT-Druid/plugins/com.eu.evidence.ee_2.8.0.20171025_0922/ee_files/pkg/mcu/infineon_common_tc2Yx/cfg/orti.cmm

Behavior: Trace32 stops executing the script with

Code: Select all

B::symbol.marker.create KEXIT      symbol.exit(EE_oo_ActivateTask)
                                                    ^ variable has no address
Patch:

Code: Select all

--- ./RT-Druid/plugins/com.eu.evidence.ee_2.8.0.20171025_0922/ee_files/pkg/mcu/infineon_common_tc2Yx/cfg/orti.cmm	2017-10-25 09:23:26.000000000 +0200
+++ ./RT-Druid/plugins/com.eu.evidence.ee_2.8.0.20171025_0922/ee_files/pkg/mcu/infineon_common_tc2Yx/cfg/orti.cmm       2017-12-05 09:54:15.216506637 +0100
@@ -33,5 +33,5 @@
 MCDS.SOURCE CPUMUX0 WriteData ON 
 
 ; Read Kernel Markers
-do markers.cmm
+;do markers.cmm
 enddo
https://github.com/matthiasb85/IDA-LET- ... i-template

3. Broken header dependencies ./RT-Druid/plugins/com.eu.evidence.ee_2.8.0.20171025_0922/ee_files/pkg/cfg/arch/cc_tricore_gnu_new.mk

Behavior: Generated header dependency files use \ as folder separator in some cases (on a Linux)

Patch:

Code: Select all

--- ./RT-Druid/plugins/com.eu.evidence.ee_2.8.0.20171025_0922/ee_files/pkg/cfg/arch/cc_tricore_gnu_new.mk	2017-10-25 09:23:24.000000000 +0200
+++ ./RT-Druid/plugins/com.eu.evidence.ee_2.8.0.20171025_0922/ee_files/pkg/cfg/arch/cc_tricore_gnu_new.mk	2017-12-05 14:32:28.264953663 +0100
@@ -425,6 +425,6 @@
 # Create dependency for all headers, and add a target for each header
 DEPENDENCY_OPT_ASM = -MD -MF $(call native_path,$(subst .o,.d_tmp,$(@)))
 # Dependencies on Windows need path translation and quote remotion
-make-depend = sed -e 's_\\\(.\)_/\1_g' -e 's_\<\([a-zA-Z]\):/_/cygdrive/\l\1/_g' -e 's_\(.*\)\(\/\)_\1\\_g' < $1_tmp > $1 && rm $1_tmp
+make-depend = sed -e 's_\\\(.\)_/\1_g' -e 's_\<\([a-zA-Z]\):/_/cygdrive/\l\1/_g' -e 's_\(.*\)\(\/\)_\1\/_g' < $1_tmp > $1 && rm $1_tmp
 endif # NODEPS
 
https://github.com/matthiasb85/IDA-LET- ... s-template

Best regards
Matthias
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Some patches for ERIKA v2.8

Post by paolo.gai »

Dear Matthias,

Thanks for the patches! We'll revise them asap and integrate them... Once done, it is likely that they will go in the nightly builds for a while...

Ciao and Thanks again!

Paolo
e.guidieri

Re: Some patches for ERIKA v2.8

Post by e.guidieri »

Hi Matthias,

I introduced some suggested fixes, but I fixed make-depend command not removed it.

We have to wait the nightly build to have them integrated in eclipse, you can access them by .svn for now.

Bye,

Errico Guidieri
MatzeB.

Re: Some patches for ERIKA v2.8

Post by MatzeB. »

e.guidieri wrote:Hi Matthias,

I introduced some suggested fixes, but I fixed make-depend command not removed it.

We have to wait the nightly build to have them integrated in eclipse, you can access them by .svn for now.

Bye,

Errico Guidieri
Nice! To be fair, I didn't understand the make-depend regex entirely, therefore my fix was just a shoot from the hip ;)
Locked