4 years, 8 months ago.

Nucleo F429ZI configuration parameter modification

Gentlemen,

I am trying to use the Nucleo F429ZI board's Ethernet AND SPI functions simultaneously. I know that for this particular board there is an issue with this, which can be solved by adding the file named: "mbed_app.json", and filling it with:

mbed_app.json file content

{
	"target_overrides":
	{
		"NUCLEO_F429ZI":
		{
			"d11_configuration": "PB_5"
		}
	}
}

Well this does not work, and the compiler gives the following error message:

error message

Error: Attempt to override undefined parameter 'app.d11_configuration' in 'application[NUCLEO_F429ZI]'

I quickly figured it out that I need to take a look here: https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json

Thus I corrected the content of my mbed_app.json to:

Corrected mbed_app.json

{
    "target_overrides":
    {
        "NUCLEO_F429ZI":
        {
            "config":
            {
                "d11_configuration": "PB_5"
            }
        }
    }
}

This gave another error message:

error message 2.

Error: In /tmp/chroots/ch-9461d33f-698d-41df-b385-7d39ef009033/src/mbed_app.json element target_overrides.NUCLEO_F429ZI.config: OrderedDict([('d11_configuration', 'PB_5')]) is not of type 'array', 'string', 'integer', 'boolean', 'null'

I have modified the content of my mbed_app.json to:

mbed_app.json 3rd attempt

{
    "target_overrides":
    {
        "NUCLEO_F429ZI":
        {
            "config":
            {
                "d11_configuration":
                {
                    "value": "PB_5"
                }
            }
        }
    }
}

This gave another error message:

error message 3.

Error: In /tmp/chroots/ch-2392b83f-b4d5-4038-a6f8-58f10c1844f2/src/mbed_app.json element target_overrides.NUCLEO_F429ZI.config: OrderedDict([('d11_configuration', OrderedDict([('value', 'PB_5')]))]) is not of type 'array', 'string', 'integer', 'boolean', 'null'

At this point I gave up understanding the logic behind target parameter structures.

Can anyone point me to the right direction how to solve this?

Thank you and Best Regards: Balazs

1 Answer

4 years, 8 months ago.

Hello Balazs,

With the following json the project should compile:

mbed_app.json

{
    "config": {
        "d11_configuration": "PB_5"
    }
}

Accepted Answer

Hi Zoli,

Thanks, this seem to have worked, it compiles now with mbed OS 5.9.5.

When I update the mbed OS to the latest version, it says:

Warning: L3912W: Option 'legacyalign' is deprecated. Error: L6636E: Pre-processor step failed for '/build/.link_script.sct'

Before I got that message, I had to comment out these lines in my code:

#if !FEATURE_LWIP
    #error [NOT_SUPPORTED] LWIP not supported for this target
#endif

Would you have any hint for me on how to solve this please?

Thank you and Best Regards: Balazs

posted by Balazs Bornyasz 08 Aug 2019

Hello Balázs,

Quote:

Warning: L3912W: Option 'legacyalign' is deprecated.

Frankly speaking, "deprecated" for me means "it works but there is now a better way to do it and it could happen that it won't work with the next revision of Mbed library". But because the message relates to the Mbed library itself I think it's up to the Team Mbed to improve it. So don't worry about that.

Quote:

Error: L6636E: Pre-processor step failed for '/build/.link_script.sct'

I don't think you should comment out something in the code to get rid of such error. My experience is that I should repeat the compilation (sometimes it takes ten or even more attempts) until the error is gone. Maybe it happens because the online compiler is overloaded? I tried to build the "mbed-os-tcp-server-example" for the NUCLEO-F429ZI target without any modification using Mbed OS 5.13.2 and it compiled with no errors.

posted by Zoltan Hudak 08 Aug 2019

Hello Zoltan,

Thank you for your comment!

I tried to reproduce, what you did. I took the project "mbed-os-tcp-server-example" as is, compiled it, no errors, some warnings, build ok. Then I left-clicked the mbed-os text in my new project under my workspace, and shortly after a small green circular arrow appeared on it indicating that the mbed-os should/could be updated. After doing the update on the mbed-os, the project did not compile anymore, it complained about "Error: [NOT_SUPPORTED] LWIP not supported for this target in "main.cpp", Line: 2, Col: 6". Note, no code modification at all to the original "mbed-os-tcp-server-example" project. Now, after updating, I could be sure that the mbed-os version is 5.13.2. But what was it before? Ok, to test this i created a new project, again based upon "mbed-os-tcp-server-example", clicked the mbed-os text in the project tree, and clicked Revision button to see what version it is. After some time, it displayed the same mbed-os history listing, with the top-most element "highlighted". But I believe this is not the actual version of the mbed-os linked to the unchanged "mbed-os-tcp-server-example" project. It just can't/doesn't list it.

What do you think of this?

Thank you and Best Regards: Balazs

posted by Balazs Bornyasz 08 Aug 2019

Seems there is some issue with Mbed's revision management system. Delete the "mbed-os-tcp-server-example" project from the online compiler and create a new one. Don't update the mbed-os library. Just check the revision. Should be the latest one - 5.13.2. I tried to compile the same project with Mbed library 5.13.2 offline and it was OK. So keep it as is. Hopefully Team Mbed will fix this problem soon.

posted by Zoltan Hudak 08 Aug 2019