Really dumb beginners questions

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

cross mob
SuMa_296631
Level 5
Level 5
50 replies posted 25 replies posted 10 replies posted

There must be something fundamental that I am missing here as I simply cannot get started with my task.

I have an SN8200 that I find needs to be programmed. Following the (marketing oriented and certainly totally untechnical) advice from Murata I ended up having to buy  an STM32F4DIS-WIFI "Discover" module that appears to have some program in it and can act as an AP. Also following the advice provided to me earlier (How to program BCM43362 on own PCB) I have also purchased an Olimex ARM-USB-TINY-H programmer.

Ultimately I want to use the SN8200 on a PCB of my own to talk via a UART interface to a MCU to provide WiFi access to the board.

I have also downloaded and installed the WICED SDK 3.1.1 and later, as it says that it does not support the STM32F1xx found in the SN8200 I have also downloaded and installed the WICED SDK 2.4.1. (By the way, I am a bit confused as the WDK 3.1.1 'Readme.txt" says that there is support for the STM32F1xx - line 29 - and later says that the STM32F1xx is not yet supported" - line 202. Which is correct?)

Therefore I understand that I have to:

1) get the Olimex programmer to connect with the STM32F4DIS-WIFI board and to talk with my iMac (fully patched Yosemite)

2) write my own firmware to load into the SN8200 using the Olimex programmer

OK - here is the situation I'm in:

Trying to get 1) above to work, I have connected the Olimex programmer to the iMac and to the STM32F4DIS-WIFI and the iMac can see the programmer but not the STM32 board (but I suspect that it because the USB connector is really only providing power).

In the WICED IDE, there are a number of sample projects in the "WICED-SDK-2.4.1" list (on the right-hand side of the screen) but all seem to relate to some other evaluation board.

Problem #1: If I double-click on one of the sample programs, then it starts the build progress and ends with errors that say the OpenOCD failed. The log file (on disk) says:

Info : only one transport option; autoselect 'jtag'

trst_and_srst separate srst_nogate trst_push_pull srst_push_pull connect_deassert_srst

DEPRECATED! use 'adapter_khz' not 'jtag_khz'

adapter speed: 1000 kHz

DEPRECATED! use 'adapter_nsrst_delay' not 'jtag_nsrst_delay'

adapter_nsrst_delay: 100

jtag_ntrst_delay: 100

cortex_m3 reset_config vectreset

Error: unable to open ftdi device: device not found

in procedure 'init'

To try to fix this, I strike Problem #2: I imagine I need to alter some setting within the sample program to tell it about the programmer I'm using to overcome the "ftdi device...not found" problem. How can I open up one of these sample files to examine its settings as I cannot find any option to expand the entry on the right of the IDE into its component parts and properties.

Problem #3: Given my ultimate goal, what documentation should I be reading that tells me:

- how to use the IDE

- how to structure the program I need to create (what components, libraries etc.) that will simply make the SN8200 connect to my WiIF network and let me create UDP ports etc.? (Murata put out a very good manual entitled "SNIC Interface Specification" that has all of the details about all of the commands I need to give the SN8200 but absolutely no mention of where to get the source code and how to build it

There must be a "really dumb beginners guide to getting something really basic going" guide somewhere but my Google searches cannot find it. There is a log of information that surrounds the $200+ boards that I don;t have (and can't afford).

For the life of me I simply cannot get started and any help would be appreciated. (On the other hand I have successfully designed and built my own circuits and programmed a number of microcomputers in the past and I don't consider my self stupid!)

Susan

0 Likes
1 Solution

Hi Susan,

Make target is simple make command could be used on command prompt as well following the "make" command.

Make Target could be edited by hitting F2 key.

For "snip.scan-SN8200x JTAG=Olimex_ARM-USB-TINY-H download run" here is the breakdown:

- snip.scan indicated the scan application in .../apps/snip/scan directory to be build. The make uses the scan.mk to build the application.

- SN8200x indicates which platform files to be used to build the application for. This is simple indicates your target device.

- JTAG=Olimex_ARM-USB-TINY-H defines the JTAG with Olimex_ARM-USB-TINY-H. Other parameters could be passed to make with similar way. If JTAG is not defined, the default value is Broadcom specific JTAG interface.

- download indicates the built application to be downloaded to the target.

- run indicates the application on the target to be run.

You are right, the SN8200 patch is only for the SDK-2.4.1. STM32F1xx has limited resources and it is not ported to SDK-3.1.x. But, it does not mean that the SN8200 would not work with SDK-3.1.x, just need to be ported. As an example, you may take a look at the SN8205 for how it was ported.

To apply the patch files select your project then click on right mouse button. Then select "Team" -> "Apply Patch..." and follow the instructions.

pastedImage_2.png

Thanks

Seyhan

View solution in original post

6 Replies
SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi,

To use the Olimex please add JTAG=Olimex_ARM-USB-TINY-H to your make target.

For example to download scan app:

     snip.scan-<YourPlatform> JTAG=Olimex_ARM-USB-TINY-H download run

There is a quick starter guide located within the SDK, .../doc/WICED-QSG202-R.pdf, perhaps it would help.

The BCM43362 WiFi chip firmware is already included in the WICED-SDK and there is no need to change the firmware. It is not accessible outside of Broadcom. Users of the WICED SDK write firmware on the host MCU, in this case STM32F1xx, to send and receive data over WiFi interface.

-Seyhan

0 Likes

Hello Seyhan,

Thank you for responding to my (rather large) whine!

I've read the Quick Start Guide you mentioned and that is how I knew to double-click on one of the "Make Target" items. However it assumes that you have the exact device mentioned and does not tell you how to adjust anything to suit whatever other board/equipment you may have. It also mentions the error message I get but says absolutely nothing about what to do about it.

What I really need to know is how the application is put together. For example, you say I need to add a command to my make target: how? What file to I need to edit? How do I get to it? What document should I read that would answer these questions?

I currently do not understand your last paragraph in that I know the BCM43362 chip is supported and I know I need to write code for the STM32F1xx device, but I'd really like to see one of the examples in the IDE to see how this is done. For example, if I want to use the "snip.scan-BCM43362WCD4 download run" entry in the "make target" list, how to I find the files that the entry is linked to (I can't find a folder with that name so I assume they are spread throughout the SDK folder tree) so that I can change the device form the STM32F4xx that the mentioned board uses to the STM32F1xx that I have.

I'm sure that there is a small piece of the puzzle that I'm not understanding and that, once I do, the whole thing will be clear to me, so thank you for helping me find that missing piece.

Susan

0 Likes

Hi Susan,

Make target is simple make command could be used on command prompt as well following the "make" command.

Make Target could be edited by hitting F2 key.

For "snip.scan-SN8200x JTAG=Olimex_ARM-USB-TINY-H download run" here is the breakdown:

- snip.scan indicated the scan application in .../apps/snip/scan directory to be build. The make uses the scan.mk to build the application.

- SN8200x indicates which platform files to be used to build the application for. This is simple indicates your target device.

- JTAG=Olimex_ARM-USB-TINY-H defines the JTAG with Olimex_ARM-USB-TINY-H. Other parameters could be passed to make with similar way. If JTAG is not defined, the default value is Broadcom specific JTAG interface.

- download indicates the built application to be downloaded to the target.

- run indicates the application on the target to be run.

You are right, the SN8200 patch is only for the SDK-2.4.1. STM32F1xx has limited resources and it is not ported to SDK-3.1.x. But, it does not mean that the SN8200 would not work with SDK-3.1.x, just need to be ported. As an example, you may take a look at the SN8205 for how it was ported.

To apply the patch files select your project then click on right mouse button. Then select "Team" -> "Apply Patch..." and follow the instructions.

pastedImage_2.png

Thanks

Seyhan

I think the penny might have dropped: the entry in the "Make Target" list is not just a name but the command itself!

If that is the case, where is the command line structure and options etc. documented?

Also, looking at the "scan" folder (in apps\snip), I see a "scan.c" file (the source file) and the "scan.mk" file. The "scan.mk" file only lists the name of the source file but the source file references several "#include" files and also a number of library routines. How are these resolved when the application is being linked?

I want to know the last point in case I need to include my own libraries.

Thanks for your assistance.

Susan

0 Likes

WooHoo - SN8200 patch applied, "make target" entry created and the application built!

Not sure if I could do this from scratch (yet!) as I've seen references to a log file for the build that I've yet to find, but a very big "thank you".

I've now run in to the error that I see several others have encountered:

Downloading Bootloader ...

**** OpenOCD failed - ensure you have installed...

so I'll see how those threads progress.

I'd still like to see where all of this is documented so I can understand how to get over problems and situations myself.

Susan

0 Likes

OK - success over the weekend.

I found some of the informality needed to create the "make target" lines by typing "./make" with nothing else on the line from the top level directory (otherwise it kept wanting to use the standard 'make' on my system which didn't help much).

Also I overcame the "OpenOCD failed" error after I went through the instructions to edit the FTDI USB Serial Driver kext (again) only this time I didn't stop when the system told me that it was not loaded in the first place and also after I had stopped Yosemite complaining about the unsigned kext when I loaded the edited version. At one stage I managed to crash my system (not sure how!) and I had to reload the kext file again but that is a small price to pay.

I still had some issues with debugging (getting the debugger to stop at breakpoints and also not go into "never never land" where it just hung the IDE) but those are for another time.

I must admit that finding the "VERBOSE=1" option for the make command line was a blessing as that helped me to track down exactly what part of the process was failing. This was especially true for the OpenOCD issue where the "make" file was failing at part of a compound command (i.e. with several "&&"s) but it was not the first one.

At least I can now compile, load and run the pre-canned applications and I will be starting on my own ones shortly (be warned - there will be more questions no doubt!)

Susan

0 Likes