ARMmbed / fpga-ci-test-shield-updater

Mbed program and python scripts to apply firmware updates to the FPGA CI Test Shield
3 stars 2 forks source link

Can't compile for F334R8 #3

Closed umbynos closed 4 years ago

umbynos commented 4 years ago

Launching this command mbed compile -t GCC_ARM -m NUCLEO_F334R8 -f -v is causing this error:

[mbed] Working path "/home/umberto/Documents/Lavoro/tesi/fpga-ci-test-shield-updater" (program)
[mbed] Exec "/usr/bin/python -u /home/umberto/Documents/Lavoro/tesi/fpga-ci-test-shield-updater/mbed-os/tools/make.py -t GCC_ARM -m NUCLEO_F334R8 --source . --build ./BUILD/NUCLEO_F334R8/GCC_ARM -v" in "/home/umberto/Documents/Lavoro/tesi/fpga-ci-test-shield-updater"
[Warning] @,: Compiler version mismatch: Have 9.2.1; expected version >= 6.0.0 and < 7.0.0
Building project fpga-ci-test-shield-updater (NUCLEO_F334R8, GCC_ARM)
Scan: fpga-ci-test-shield-updater

Could not compile for NUCLEO_F334R8: Target does not support mbed OS 5
[mbed] ERROR: "/usr/bin/python" returned error.
       Code: 1
       Path: "/home/umberto/Documents/Lavoro/tesi/fpga-ci-test-shield-updater"
       Command: "/usr/bin/python -u /home/umberto/Documents/Lavoro/tesi/fpga-ci-test-shield-updater/mbed-os/tools/make.py -t GCC_ARM -m NUCLEO_F334R8 --source . --build ./BUILD/NUCLEO_F334R8/GCC_ARM -v"
---

The nucleo board I'm using should be supported.

MarceloSalazar commented 4 years ago

@umbynos it seems you're trying to use a target that's very constrained and not supported in Mbed OS 5.

Can you switch to other board? See full list on the website

FYI @jamesbeyond

umbynos commented 4 years ago

I can use a DISCO_H747l but it's not supported. I have only these two available

jeromecoutant commented 4 years ago

Hi

In order to compile NUCLEO_F334R8:

And one question:

Thx

umbynos commented 4 years ago

hello! mbed ls gives me mbed-os (#b6370b4c37f3, tags: latest, mbed-os-5.15.3), so I think I'm using the correct version of mbed-os. I've patched the targets.json but nothing changed.

[mbed] Working path "/home/umberto/Documents/Lavoro/tesi/fpga/fpga-ci-test-shield-updater/mbed-os" (library)
[mbed] Program path "/home/umberto/Documents/Lavoro/tesi/fpga/fpga-ci-test-shield-updater"
[mbed] Exec "/usr/bin/python -u /home/umberto/Documents/Lavoro/tesi/fpga/fpga-ci-test-shield-updater/mbed-os/tools/make.py -t GCC_ARM -m NUCLEO_F334R8 --source .. --build ../BUILD/NUCLEO_F334R8/GCC_ARM -v" in "/home/umberto/Documents/Lavoro/tesi/fpga/fpga-ci-test-shield-updater/mbed-os"
Building project fpga-ci-test-shield-updater (NUCLEO_F334R8, GCC_ARM)
Scan: fpga-ci-test-shield-updater

Could not compile for NUCLEO_F334R8: Target does not support mbed OS 5
[mbed] ERROR: "/usr/bin/python" returned error.
       Code: 1
       Path: "/home/umberto/Documents/Lavoro/tesi/fpga/fpga-ci-test-shield-updater/mbed-os"
       Command: "/usr/bin/python -u /home/umberto/Documents/Lavoro/tesi/fpga/fpga-ci-test-shield-updater/mbed-os/tools/make.py -t GCC_ARM -m NUCLEO_F334R8 --source .. --build ../BUILD/NUCLEO_F334R8/GCC_ARM -v"
---

I have tried to update because of this issue. I don't know if the problem is related to an old version of the fpga code or not, but I thought it was worth update it

jeromecoutant commented 4 years ago

Maybe ?

$ mbed --version
1.10.2
umbynos commented 4 years ago

I have that version too

MarceloSalazar commented 4 years ago

This is what I do and works for me:

mbed import https://github.com/ARMmbed/fpga-ci-test-shield-updater
cd fpga-ci-test-shield-updater
<edit mbed-os/targets/targets.json as indicated by Jerome>
mbed compile -t GCC_ARM -m NUCLEO_F334R8
---
[Warning] @,: Compiler version mismatch: Have 9.2.1; expected version >= 6.0.0 and < 7.0.0
Building project fpga-ci-test-shield-updater (NUCLEO_F334R8, GCC_ARM)
Scan: fpga-ci-test-shield-updater
Compile [  0.1%]: mbed_tz_context.c
Compile [  0.2%]: MCR20Drv.c
Compile [  0.4%]: rf_configuration
...
umbynos commented 4 years ago
❰umberto❙~/Documents/Lavoro❱✔≻ mbed import https://github.com/ARMmbed/fpga-ci-test-shield-updater                                    10:25:12
[mbed] Working path "/home/umberto/Documents/Lavoro" (directory)
[mbed] Importing program "fpga-ci-test-shield-updater" from "https://github.com/ARMmbed/fpga-ci-test-shield-updater" at latest revision in the current branch
[mbed] Adding library "mbed-os" from "https://github.com/ARMmbed/mbed-os" at rev #a4738fa9a8fa
❰umberto❙~/Documents/Lavoro❱✔≻ cd fpga-ci-test-shield-updater                                                                        10:25:30
❰umberto❙~/Documents/Lavoro/fpga-ci-test-shield-updater(gitmaster)❱✔≻ subl mbed-os/targets/targets.json                              10:25:31
❰umberto❙~/Documents/Lavoro/fpga-ci-test-shield-updater(gitmaster)❱✔≻ mbed compile -t GCC_ARM -m NUCLEO_F334R8                       10:26:30
[mbed] Working path "/home/umberto/Documents/Lavoro/fpga-ci-test-shield-updater" (program)
[Warning] @,: Compiler version mismatch: Have 9.2.1; expected version >= 6.0.0 and < 7.0.0
Building project fpga-ci-test-shield-updater (NUCLEO_F334R8, GCC_ARM)
Scan: fpga-ci-test-shield-updater

Could not compile for NUCLEO_F334R8: Target does not support mbed OS 5
[mbed] ERROR: "/usr/bin/python" returned error.
       Code: 1
       Path: "/home/umberto/Documents/Lavoro/fpga-ci-test-shield-updater"
       Command: "/usr/bin/python -u /home/umberto/Documents/Lavoro/fpga-ci-test-shield-updater/mbed-os/tools/make.py -t GCC_ARM -m NUCLEO_F334R8 --source . --build ./BUILD/NUCLEO_F334R8/GCC_ARM"
       Tip: You could retry the last command with "-v" flag for verbose output
---
jeromecoutant commented 4 years ago

Maybe add the git diff mbed-os/targets/targets.json ?

umbynos commented 4 years ago
git diff targets/targets.json                                     11:11:17
diff --git a/targets/targets.json b/targets/targets.json
index d6a30da7b2..26fa95d8e7 100644
--- a/targets/targets.json
+++ b/targets/targets.json
@@ -2468,6 +2468,7 @@
         ],
         "default_lib": "small",
         "release_versions": ["2"],
+        "c_lib": "small",
         "device_name": "STM32F334R8"
     },
     "NUCLEO_F401RE": {
jamesbeyond commented 4 years ago

Hi @umbynos , by following your steps I can reproduce your issue

bed import https://github.com/ARMmbed/fpga-ci-test-shield-updater
cd fpga-ci-test-shield-updater
mbed compile -t GCC_ARM -m NUCLEO_F334R8

to resolve this you need to modify your targets.json file, in NUCLEO_F334R8 (line 2470) "release_versions": ["2"], ->"release_versions": ["2","5"],

This would enable to compile the target for mbed-OS 5. I can successfully build without issue. but I don't have that target can't try is the built image works

jamesbeyond commented 4 years ago

@umbynos, I also have the same question as Jerome, just curious, Why do you need to use this application? Do you aware this application will require specialized hardware? Or maybe you are from a partner of ours, and you already get hold of the FPGA HW?

umbynos commented 4 years ago

Thank you @jamesbeyond, with your fix I succeed in compiling, also upload and update of the FPGA code worked fine. Yeah, I'm aware of the requirements, and I already have the FPGA HW. As I explained here I tried to solve a problem with greentea testing by updating the FPGA code. I'm trying to learn and study something about hw in the loop testing for my master's thesis.

jeromecoutant commented 4 years ago

I succeed in compiling, also upload and update of the FPGA code worked fine.

Maybe we can close this point ? Thx

jamesbeyond commented 4 years ago

resolved