[mbedmicro/pyOCD] Attribute or syntax errors while making test on new board added. (#625)

0 views
Skip to first unread message

nguessar

unread,
Apr 23, 2019, 8:42:31 AM4/23/19
to mbedmicro/pyOCD, Subscribed

When i make test on a new board added, i get attribute or syntax error like this:

image

What did I did wrong?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Chris Reed

unread,
Apr 23, 2019, 2:59:44 PM4/23/19
to mbedmicro/pyOCD, Subscribed

You need to set the target type. Either use the --target command line argument, or target_override user option (best set in a pyocd.yaml config file). When running the functional tests you have to use a config file (in the test/ directory) to set the target type, as well as set the test_binary option (set to just the name, not a path, of a file in the binaries/ directory).

You can check the Target type is x log message to verify which target pyOCD is using. If no target type is set it will default to "cortex_m", which doesn't have flash support or a memory map.

nguessar

unread,
Apr 24, 2019, 4:51:58 AM4/24/19
to mbedmicro/pyOCD, Subscribed

I had already done that. but i named the .yaml file "test_boards" instead of "pyocd". Rename the file to pyocd solved the problem. Thank you @flit .

Chris Reed

unread,
Apr 24, 2019, 4:25:38 PM4/24/19
to mbedmicro/pyOCD, Subscribed

Is "test_boards.yaml" still mentioned in the docs? I checked, but could easily have missed it.

Chris Reed

unread,
Apr 24, 2019, 4:25:39 PM4/24/19
to mbedmicro/pyOCD, Subscribed

Closed #625.

rgf97

unread,
Apr 24, 2019, 5:23:21 PM4/24/19
to mbedmicro/pyOCD, Subscribed

No, it is not mentioned in this docs. I did not use this docs. But i saw the same thing in a past issue solutions. And there, it was indicated to use a test_boards.yaml.
Honestly, i thought the file name did not matter.

Chris Reed

unread,
Apr 24, 2019, 5:26:02 PM4/24/19
to mbedmicro/pyOCD, Subscribed

Well, originally it was "test_boards.yaml". But when I added general config file support via "pyocd.yaml", I changed the functional tests to use that so there was only one config file name.

Reply all
Reply to author
Forward
0 new messages