Trying to run openocd/libftdi on ARM 32-bit

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
jusadams
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

I'm trying to build up a test platform for our device off a raspberry pi which is running 32-bit Linux and is an ARM platform. I am trying to j-link flash the device from it. I copied over my build/, my apps/, and my tools/ folders but it looks like the ./tools/OpenOCD/Linux32/openocd-all-brcm-libftdi executible doesn't work on ARM.


Downloading Bootloader ...
./tools/OpenOCD/Linux32/openocd-all-brcm-libftdi: cannot execute binary file: Exec format error
**** OpenOCD failed ****

I don't believe that is built during the normal build process. I think it is just packaged with WICED Studio. Is there any way I can get flashing working on ARM 32-bit? I don't need it to build the full file, just be able to flash it. I'm currently running WICED-Studio 6.6.1

0 Likes
1 Solution
Phanindra_I
Moderator
Moderator
Moderator
250 sign-ins 10 likes given 25 likes received

Hi,

The OpenOCD that is built into WICED is https://github.com/Broadcom/WICED-OpenOCD , the one that you have used before. You can go through "Readme.txt" file in OpenOCD/source folder of WICED which explains how to build the OpenOCD binary that is shipped with WICED.

Thanks

 

View solution in original post

0 Likes
9 Replies
Phanindra_I
Moderator
Moderator
Moderator
250 sign-ins 10 likes given 25 likes received

Hi,

Yes, openocd-all-brcm-libftdi.exe is not built through make target. It comes with the WICED Studio.                

Can you specify the wifi chip that you are using? Also, have you modified the make target appropriately since you are using J-link for flashing?

Are you not building your application in WICED, just trying to flash binaries?

0 Likes

We are using the ISM4343-WBM-L151 chip. I can j-link flash on my main machine which is an Ubuntu Linux 64 bit machine. I am not planning to build on the raspberry pi (32-bit ARM). I want to be able to take a release build, push it to the raspberry pi and let it flash, and test our device with some automated tests. I noticed this exists https://github.com/Broadcom/WICED-OpenOCD when I was searching for a way to build it. I was able to go through the make steps (fixing quite a few minor errors) and add my device_id to make it work. I haven't verified all pieces yet, but it seemed to update the board. Is that the right way to go about it or is having you all build openocd-all-brcm-libftdi for 32-bit ARM the right solution?

0 Likes
Phanindra_I
Moderator
Moderator
Moderator
250 sign-ins 10 likes given 25 likes received

Hi,

I believe you want to run WICED on raspberry pi and flash the binaries from the raspberry itself. Do correct me if i am wrong.

If that's the case, then you can use openocd-all-brcm-libftdi built for running on 32 bit linux to flash binaries.

Path for the same in WICED: tools/OpenOCD/Linux32

Thanks

0 Likes

That is what I tried first. If you refer to the first post, you can see my path is:
./tools/OpenOCD/Linux32/openocd-all-brcm-libftdi: cannot execute binary file: Exec format error
That is why I believe it is an ARM issue, but I don't actually know.

0 Likes
Phanindra_I
Moderator
Moderator
Moderator
250 sign-ins 10 likes given 25 likes received

Hi,

Since you have mentioned that you are able to update the board, you can go through with that. I would recommend using the OpenOCD in the below link since the one you are using is an older version. Your target and JTAG adapter are supported as per README. You can also check once.

Link - (https://github.com/Infineon/openocd)

Thanks

0 Likes

I pulled that (had to clone the git submodules from my local WICED-OpenOCD due to repo.or.cz being down) and fixed a few small compile issues. After building, I ran it with my commands from WICED-6.6.1 and it looks like there are some version related issues. Do you know what hash/tag I should be building with to match what is built into WICED Studio 6.6.1?

0 Likes
Phanindra_I
Moderator
Moderator
Moderator
250 sign-ins 10 likes given 25 likes received

Hi,

WICED is not recommended for new designs and you can use ModusToolbox. The OpenOCD whose github link that I have attached comes with MTB and you can use the latest version of that (v4.3.1).

Thanks  

0 Likes

I understand. If I was at the beginning of a product cycle we would be using ModusToolbox. I'm at the END of a product cycle that has been going on for the last 3ish years which means we aren't willing to move that product from WICED to ModusToolbox at this time.

0 Likes
Phanindra_I
Moderator
Moderator
Moderator
250 sign-ins 10 likes given 25 likes received

Hi,

The OpenOCD that is built into WICED is https://github.com/Broadcom/WICED-OpenOCD , the one that you have used before. You can go through "Readme.txt" file in OpenOCD/source folder of WICED which explains how to build the OpenOCD binary that is shipped with WICED.

Thanks

 

0 Likes