Can't Compile SCFW Debug Monitor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't Compile SCFW Debug Monitor

Jump to solution
1,341 Views
philippe_schenk
Contributor IV

Hello,

 

I tried to compile SCFW with debug monitor enabled. This works fine if I do it for the MEK board:
$ make clean; make SOC=MX8QX B=mek R=b0 M=1 qx
Compiling platform/drivers/pmic/fsl_pmic.c
Compiling platform/drivers/pmic/pf8100/fsl_pf8100.c
Compiling platform/drivers/pmic/pf100/fsl_pf100.c
Compiling platform/board/mx8qx_mek/board.c
Compiling platform/board/board_common.c
Assembling platform/board/board.S
Compiling platform/board/pmic.c
Linking build_mx8qx_b0/scfw_tcm.elf ....
Objcopy build_mx8qx_b0/scfw_tcm.bin ....
done.


I cannot reproduce this for our board:

$ make clean; make SOC=MX8QX B=apalis R=b0 M=1 qx
Compiling platform/drivers/pmic/fsl_pmic.c
Compiling platform/drivers/pmic/pf8100/fsl_pf8100.c
Compiling platform/board/mx8qx_apalis/board.c
Compiling platform/board/board_common.c
Assembling platform/board/board.S
Linking build_mx8qx_b0/scfw_tcm.elf ....
/opt/toolchains/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: build_mx8qx_b0/main/monitor.o: in function `cmd_pmic':
/home/bamboo/automation/sumo-4.14.98-2.3.0/bsp_pkg_mx8/temp_build_dir/build-imx8qmmek/tmp/work/imx8qmmek-poky-linux/imx-scfw-porting-kit/1.3.1+gitAUTOINC+b929edfe9e-r0/git/firmware/platform/main/monitor.c:2554: undefined reference to `dynamic_pmic_register_access'
/opt/toolchains/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /home/bamboo/automation/sumo-4.14.98-2.3.0/bsp_pkg_mx8/temp_build_dir/build-imx8qmmek/tmp/work/imx8qmmek-poky-linux/imx-scfw-porting-kit/1.3.1+gitAUTOINC+b929edfe9e-r0/git/firmware/platform/main/monitor.c:2578: undefined reference to `dynamic_pmic_register_access'
/opt/toolchains/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: build_mx8qx_b0/main/monitor.o: in function `cmd_pmic_list_8100':
/home/bamboo/automation/sumo-4.14.98-2.3.0/bsp_pkg_mx8/temp_build_dir/build-imx8qmmek/tmp/work/imx8qmmek-poky-linux/imx-scfw-porting-kit/1.3.1+gitAUTOINC+b929edfe9e-r0/git/firmware/platform/main/monitor.c:2640: undefined reference to `dynamic_pmic_get_voltage'
/opt/toolchains/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /home/bamboo/automation/sumo-4.14.98-2.3.0/bsp_pkg_mx8/temp_build_dir/build-imx8qmmek/tmp/work/imx8qmmek-poky-linux/imx-scfw-porting-kit/1.3.1+gitAUTOINC+b929edfe9e-r0/git/firmware/platform/main/monitor.c:2649: undefined reference to `dynamic_pmic_get_voltage'
collect2: error: ld returned 1 exit status
make: *** [Makefile:555: build_mx8qx_b0/scfw_tcm.elf] Error 1‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


I compared the MEK board file and ours, but can't spot any difference regarding this linker errors. Could you please help me getting that compiled and the bug fixed so we are able to use the debug monitor too in the future?

 

Thanks and Best Regards
Philippe

 

FYI: Raluca Popa

1 Solution
1,251 Views
philippe_schenk
Contributor IV

We were able to solve the issue ourselves, it was a missing thing in Makefile that we didn't port over:

diff --git a/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/Makefile b/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/Makefile
index 0f8901e..b04746f 100644
--- a/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/Makefile
+++ b/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/Makefile
@@ -48,3 +48,6 @@ CTRL_MD += $(SRC)/board/mx8qx_$(B)/control.txt
DIRS += $(OUT)/board/mx8qx_$(B)
+ifeq ($(M),1)
+ OBJS += $(OUT)/board/pmic.o
+endif
diff --git a/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/board.bom b/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/board.bom
index f129642..68d9ada 100755
--- a/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/board.bom
+++ b/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/board.bom
@@ -34,3 +34,6 @@ DRV2 += \
pmic \
pmic/pf8100
+ifeq ($(M),1)
+ DRV2 += pmic/pf100
+endif‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

View solution in original post

0 Kudos
Reply
1 Reply
1,252 Views
philippe_schenk
Contributor IV

We were able to solve the issue ourselves, it was a missing thing in Makefile that we didn't port over:

diff --git a/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/Makefile b/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/Makefile
index 0f8901e..b04746f 100644
--- a/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/Makefile
+++ b/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/Makefile
@@ -48,3 +48,6 @@ CTRL_MD += $(SRC)/board/mx8qx_$(B)/control.txt
DIRS += $(OUT)/board/mx8qx_$(B)
+ifeq ($(M),1)
+ OBJS += $(OUT)/board/pmic.o
+endif
diff --git a/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/board.bom b/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/board.bom
index f129642..68d9ada 100755
--- a/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/board.bom
+++ b/src/scfw_export_mx8qx_b0/platform/board/mx8qx_apalis/board.bom
@@ -34,3 +34,6 @@ DRV2 += \
pmic \
pmic/pf8100
+ifeq ($(M),1)
+ DRV2 += pmic/pf100
+endif‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos
Reply