Some quick hints for now, and hopefully I'll fill this in more later : )
If you see the exception "The type initializer for 'Emgu.CV.CvInvoke' threw an exception." then you need to dig deeper to figure out what actually happened. View details of the exception and drill down into the InnerException until you get to the bottom. You'll probably find one of these...
Exception: Probable Cause
"An attempt was made to load a program with an incorrect format." : You are compiling for 32-bit but the OpenCV library you are using was compiled for 64-bit. Or the other way around.
"Unable to load DLL 'opencv_core240': The specified module could not be found" : The core240 DLL is not in the same folder as your executable...or if you do have it there then you might need to install (or reinstall) The Microsoft Visual C++ 2010 redistributable package of the latest Service Pack (SP1 is current as of this writing). x86: http://www.microsoft.com/en-us/download/details.aspx?id=8328 x64: http://www.microsoft.com/en-us/download/details.aspx?id=13523
Still having trouble loading the core240? Use the great Dependency Walker tool from http://www.dependencywalker.com/ to open the core240 DLL and see what other DLLs might be missing!
Saturday, July 6, 2013
Wednesday, January 9, 2013
CooCox and GCC-ARM 4.7 (2012q4)
Real quick update for those of you struggling to make GCC ARM 4.7.3 work with CooCox.
First of all, make sure that you when to the Project menu and selected the new toolchain path (e.g. ...\4.7 2012q4\arm-none-eabi\bin) AND set the linker to the new libm.a file in the new toolchain path (e.g. ...\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libm.a for the Hardware FPU library option)
If you properly configure the new libraries and you are getting a compiler error saying "[cc] arm-none-eabi-gcc: error: unrecognized command line option '-Wl'"
Download this file: org.coocox.builder.ui_1.0.0.201212141638.jar
and put it on your CoIDE plugins folder, e.g. C:\CooCox\CoIDE\plugins, overwriting the one that is there.
If you have other problems, and you're trying to use printf(), then you and I are in the same boat, so hold on for the solution. For now get rid of printf() and try to be more creative about getting data out of the uC.
Thanks to these guys for the help on this one.
S
First of all, make sure that you when to the Project menu and selected the new toolchain path (e.g. ...\4.7 2012q4\arm-none-eabi\bin) AND set the linker to the new libm.a file in the new toolchain path (e.g. ...\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libm.a for the Hardware FPU library option)
If you properly configure the new libraries and you are getting a compiler error saying "[cc] arm-none-eabi-gcc: error: unrecognized command line option '-Wl'"
Download this file: org.coocox.builder.ui_1.0.0.201212141638.jar
and put it on your CoIDE plugins folder, e.g. C:\CooCox\CoIDE\plugins, overwriting the one that is there.
If you have other problems, and you're trying to use printf(), then you and I are in the same boat, so hold on for the solution. For now get rid of printf() and try to be more creative about getting data out of the uC.
Thanks to these guys for the help on this one.
S
An Adventure in CooCox and Cortex M4 (STM32F4)
From the outset I think this is going to be a multipart blog of my journey though a new IDE and processor. As before, this series will serve partially as my notebook of how to do it again and your more-or-less guide to how to do it the right way, including visibility of some pitfalls which might try to grab you.
My preferred flavor of ARM is the ST Microelectronics family so I started with the STM32F4 and chose the Olimex STM32-E407 development board. Olimex, based out of the eastern European country of Bulgaria, has great products, at great prices, with valuable support, and cheap shipping to the US. Olimex also has great FTDI-based JTAG options, like the ARM-USB-TINY-H, that are very inexpensive and yet very powerful. In the past I've used the TINY with IAR and Eclipse via the OpenOCD GDB Server so I was prepared for the manual process of starting the server and messing around with config files...but I was in for a treat.
Now enter the IDE choice. I was going to use IAR Embedded Workbench for ARM because it is always easy to get started and the support is great. In the past I've gotten away with the 32KB Kickstart version because my STM32F103 projects were never really that crazy, even with USB. I started estimating my solution size and I knew 32KB wouldn't cut it, so I checked the prices on the full versions of IAR and immediately started thinking Eclipse again : ) Started Googling for new things that I may have missed in the past year and I found CooCox.org which is a free commercial (aka closed source) product based on Eclipse. Now, you'll have to excuse me, but I don't really understand how free and commercial go together nor do I get how they close-sourced something based on Eclipse. However, the product is amazing. Incredible support for all the ARMs I care about, uses the ARM compiler, natively employs the Olimex JTAG, great community of developers, and actively being improved. After a few months with it I actually prefer it over IAR thanks to the great text editor and debugger. The only downside is that the Java-based engine is a bit slow to spool up the debugger in Windows (the only supported OS) on my aging MacBook Pro 2.4GHz Core2Duo. Did I mention it is free and completely unlimited in code size? Much more on all of this later.
Briefly on schematic and layout: I used to use OrCAD Capture and Layout. Well, Layout was retired in 16.2 and I decided if I had to learn something new (like 16.3+ PCB Editor) then I better be smart about where I spend my time learning. OrCAD isn't cheap, but its not expensive. Until you have three engineers who want to share files and co-develop. I'll save the EDA comparison for later, but for now go read about KiCAD at their website and on Wikipedia. Perfect? No. Free? Yes. Cross platform? Mostly...stick to Windows or Linux.
Ok, that's the project intro. Time to delve into CooCox so I can save some of my thoughts and get back to work.
Project Goals
A little intro to what I am trying to achieve. I've come up with a brilliant idea for a product that until recently could only be done on a PC or single board computer (SBC) at great cost and inconvenience...at least when you come from a microcontroller and consumer product background like me. I recently discovered the ARM Cortex M4 with integrated floating point unit (FPU) and realized that something like this running at 168MHz is exceeding the performance of my old Intel 486DX and possibly even my first Pentium MMX. I decided it was time to go for it and created my shopping list:- Cortex M4
- Development board with Ethernet connectivity
- JTAG hardware
- IDE and compiler that wouldn't limit my solution size
- Schematic capture and board layout software suitable for a distributed development team
- Be as cheap as possible since we don't have a customer yet!
My preferred flavor of ARM is the ST Microelectronics family so I started with the STM32F4 and chose the Olimex STM32-E407 development board. Olimex, based out of the eastern European country of Bulgaria, has great products, at great prices, with valuable support, and cheap shipping to the US. Olimex also has great FTDI-based JTAG options, like the ARM-USB-TINY-H, that are very inexpensive and yet very powerful. In the past I've used the TINY with IAR and Eclipse via the OpenOCD GDB Server so I was prepared for the manual process of starting the server and messing around with config files...but I was in for a treat.
Now enter the IDE choice. I was going to use IAR Embedded Workbench for ARM because it is always easy to get started and the support is great. In the past I've gotten away with the 32KB Kickstart version because my STM32F103 projects were never really that crazy, even with USB. I started estimating my solution size and I knew 32KB wouldn't cut it, so I checked the prices on the full versions of IAR and immediately started thinking Eclipse again : ) Started Googling for new things that I may have missed in the past year and I found CooCox.org which is a free commercial (aka closed source) product based on Eclipse. Now, you'll have to excuse me, but I don't really understand how free and commercial go together nor do I get how they close-sourced something based on Eclipse. However, the product is amazing. Incredible support for all the ARMs I care about, uses the ARM compiler, natively employs the Olimex JTAG, great community of developers, and actively being improved. After a few months with it I actually prefer it over IAR thanks to the great text editor and debugger. The only downside is that the Java-based engine is a bit slow to spool up the debugger in Windows (the only supported OS) on my aging MacBook Pro 2.4GHz Core2Duo. Did I mention it is free and completely unlimited in code size? Much more on all of this later.
Briefly on schematic and layout: I used to use OrCAD Capture and Layout. Well, Layout was retired in 16.2 and I decided if I had to learn something new (like 16.3+ PCB Editor) then I better be smart about where I spend my time learning. OrCAD isn't cheap, but its not expensive. Until you have three engineers who want to share files and co-develop. I'll save the EDA comparison for later, but for now go read about KiCAD at their website and on Wikipedia. Perfect? No. Free? Yes. Cross platform? Mostly...stick to Windows or Linux.
Ok, that's the project intro. Time to delve into CooCox so I can save some of my thoughts and get back to work.
Labels:
ARM Cortex M4,
CooCox,
development,
Eclipse,
EDA,
embedded,
JTAG,
KiCAD,
Olimex,
open source,
STM32
Thursday, February 23, 2012
2009 MacBook Pro 8GB RAM and Hybrid HDD Upgrade [UPDATED]
Just for the record, I updated my 2009 MBP 13" from 4GB of RAM to 8GB of RAM. From the factory it was spec'ed to have a maximum of 4GB, but somewhere along the road Apple updated the BIOS/EFI to allow 8. Maybe it was around the release of Lion, but as long as you have it you are ready. It wasn't trouble free for me as I initially purchased two 4GB 1333MHz DD3 from Crucial thinking the Mac would underclock them to the specified 1066MHz. Nope. Multiple hard-as-a-rock crashes, not even a blue screen or grey screen or reboot, just stopped. Windows via Bootcamp would start and run for a bit at 1333MHz, but MacOS wouldn't even get close. Swapped them SODIMMs out for 1066MHz parts and everything was great. I've had a two hard freezes since the upgrade, but not sure if it is x64 compatibility with some of my engineering hardware drivers or what.
I really wanted an SSD for the laptop, but I needed at least 500GB which was just too much money for now, so I found a Seagate Momentous 750GB Hybrid drive on Amazon. It is a 7200RPM laptop hard drive with an 8GB SSD buffer integrated, with 32MB of RAM buffer, too. I found it for just $20 more than a regular 750GB so I went for it. Turns out it was a good choice! Loading the operating systems and dev tools is very noticeably faster, and I was coming from a Western Digital Scorpio Black 320GB 7200RPM drive. Since then I read some reviews at Gizmodo and Anandtech and my feelings were confirmed by their benchmarks. Sometimes you get SSD performance and sometimes you are limited by the spinning platters but still get performance as good as a high end desktop disk. I'm so happy I ordered another one for my 2007 iMac because I'm tired of hearing the factory 3.5" drive churn and I'm pretty sure it'll breath new life in to the ol' girl.
[UPDATE 1/9/2013]
Love the upgrade still, the initial freezes must have been unrelated. Everything is great working the old computer to death with Mountain Lion, Parallels 7, and Windows 7 x64. My wife's new Core i7 MacBook Air with 8GB of RAM and 512GB SSD is making me look kinda dumb now though.
S
I really wanted an SSD for the laptop, but I needed at least 500GB which was just too much money for now, so I found a Seagate Momentous 750GB Hybrid drive on Amazon. It is a 7200RPM laptop hard drive with an 8GB SSD buffer integrated, with 32MB of RAM buffer, too. I found it for just $20 more than a regular 750GB so I went for it. Turns out it was a good choice! Loading the operating systems and dev tools is very noticeably faster, and I was coming from a Western Digital Scorpio Black 320GB 7200RPM drive. Since then I read some reviews at Gizmodo and Anandtech and my feelings were confirmed by their benchmarks. Sometimes you get SSD performance and sometimes you are limited by the spinning platters but still get performance as good as a high end desktop disk. I'm so happy I ordered another one for my 2007 iMac because I'm tired of hearing the factory 3.5" drive churn and I'm pretty sure it'll breath new life in to the ol' girl.
[UPDATE 1/9/2013]
Love the upgrade still, the initial freezes must have been unrelated. Everything is great working the old computer to death with Mountain Lion, Parallels 7, and Windows 7 x64. My wife's new Core i7 MacBook Air with 8GB of RAM and 512GB SSD is making me look kinda dumb now though.
S
Microsoft Office Crashing When Editing Chart Titles
Wow, it's been 3 months since my last post. I guess I'm not learning enough! Well, that's not true. It's been a busy time of moving to a new home, moving also to a new office, releasing a new software product, and crazy holidays. It's fun!
Today's biggie is a result of changing my Boot Camp installation to Windows 7 x64. After the complete redo of my Windows partition I had the strangest problem of Office 2007 crashing 100% of the time when I tried to edit the chart or axis title of a chart in Excel. I think it also happened when editing text blocks in Paint. Well after LOTS of searching, service pack installs, and many restarts I found this: Microsoft Technet
In summary this is all you need to do, and from what I read it affects Office 2007 and Office 2010 equally, for me it was only the x64 version, but you never know.
Today's biggie is a result of changing my Boot Camp installation to Windows 7 x64. After the complete redo of my Windows partition I had the strangest problem of Office 2007 crashing 100% of the time when I tried to edit the chart or axis title of a chart in Excel. I think it also happened when editing text blocks in Paint. Well after LOTS of searching, service pack installs, and many restarts I found this: Microsoft Technet
In summary this is all you need to do, and from what I read it affects Office 2007 and Office 2010 equally, for me it was only the x64 version, but you never know.
- Open Control Panel
- In view mode “View by Category”, find the section “Clock, Language and Region”
- Click “Change Keyboards or other input methods”
- Press the button “Change Keyboards”
- Press the button “Add”
- Scroll down to “English (United States)” and expand.
- Check box “US”
- Press OK.
- Press OK. — You’ll see two keyboards listed “US” and “United States (Apple)”
- Press OK.
Wednesday, November 16, 2011
Magic Safari Disappearing Trick
Maybe its an old developer bug/Easter egg, or a iPhone 2G jailbreak shadow hanging on, but since I can remember (iPhone 3G iOS3, iPhone 3GS iOS4, iPhone 4S iOS5) triple tapping my Safari icon will make it disappear and the only way to bring it back is to move the icons around which makes it pop back, but it still won't work anymore. I have to restart the phone to make it work, otherwise I need to use the taskbar or search in Spotlight to open the app. None of my co-workers or family have the phenomenon. Anyone else?
Tuesday, November 15, 2011
Shortcuts to WiFi and Other Settings on iPhone Homescreen
Finally! One click access to the WiFi switch without having to jailbreak.
http://iphoneza.co.za/IconSettings/
Thx u for the WiFiz.
http://iphoneza.co.za/IconSettings/
Thx u for the WiFiz.
Friday, November 11, 2011
Broken Visual Studio 2008/2010 Wizards?
On multiple computers at various times I have run into this INSANELY frustrating issue where creating a new project in Microsoft Visual Studio 2008 or 2010 will fail when the created project type brings up one of those Application Wizard screens. The symptom is that instead of the Wizard showing its content a File Download window pops up asking if you want to save, open, or cancel the download of Default.htm. Microsoft is surprisingly quiet on the issue, but its gone on a for a long time, since the IE7 days and VS2005, judging from the forums. I searched for "Visual Studio Wizard Navigation to this webpage cancelled" and every variant I could think of and tried multiple solutions until I found this: Microsoft Forum that at the very bottom linked to this: Registry Keys to Fix the Problem in which you can find the ".htm" fixer. The registry keys that it defines are extensive, and I haven't gone through all of the file to see what exactly it does, but it does work. Disclaimer is that I've only used this on Windows 7 32-bit.
Here is a listing of the registry keys from the second link, for posterity:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\.htm]
[HKEY_CLASSES_ROOT\.htm]"PerceivedType"="text"@="htmlfile""Content Type"="text/html"
[HKEY_CLASSES_ROOT\.htm\OpenWithList]
[HKEY_CLASSES_ROOT\.htm\OpenWithList\notepad.exe]@=""
[HKEY_CLASSES_ROOT\.htm\PersistentHandler]@="{eec97550-47a9-11cf-b952-00aa0051fe20}"
[HKEY_CLASSES_ROOT\htmlfile]"AppUserModelID"="Microsoft.InternetExplorer.Default"@="HTML Document""FriendlyTypeName"="@C:\\Windows\\System32\\ieframe.dll,-912"
[HKEY_CLASSES_ROOT\htmlfile\CLSID]@="{25336920-03F9-11cf-8FD0-00AA00686F13}"
[HKEY_CLASSES_ROOT\htmlfile\DefaultIcon]@=hex(2):25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,\ 00,73,00,25,00,5c,00,49,00,6e,00,74,00,65,00,72,00,6e,00,65,00,74,00,20,00,\ 45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,5c,00,69,00,65,00,78,00,70,\ 00,6c,00,6f,00,72,00,65,00,2e,00,65,00,78,00,65,00,2c,00,2d,00,31,00,37,00,\ 00,00
[HKEY_CLASSES_ROOT\htmlfile\ScriptHostEncode]@="{0CF774D0-F077-11D1-B1BC-00C04F86C324}"
[HKEY_CLASSES_ROOT\htmlfile\shell]@="opennew"
[HKEY_CLASSES_ROOT\htmlfile\shell\open]@="Open in S&ame Window""MUIVerb"="@C:\\Windows\\System32\\ieframe.dll,-5732"
[HKEY_CLASSES_ROOT\htmlfile\shell\open\command]@="\"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe\" -nohome"
[HKEY_CLASSES_ROOT\htmlfile\shell\open\ddeexec]@="\"file://%1\",,-1,,,,,""NoActivateHandler"=""
[HKEY_CLASSES_ROOT\htmlfile\shell\open\ddeexec\Application]@="IExplore"
[HKEY_CLASSES_ROOT\htmlfile\shell\open\ddeexec\Topic]@="WWW_OpenURL"
[HKEY_CLASSES_ROOT\htmlfile\shell\opennew]@="&Open""MUIVerb"="@C:\\Windows\\System32\\ieframe.dll,-5731"
[HKEY_CLASSES_ROOT\htmlfile\shell\opennew\command]@="\"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe\" %1"
[HKEY_CLASSES_ROOT\htmlfile\shell\opennew\ddeexec]@="\"%1\",,-1,0,,,,""NoActivateHandler"=""
[HKEY_CLASSES_ROOT\htmlfile\shell\opennew\ddeexec\Application]@="IExplore"
[HKEY_CLASSES_ROOT\htmlfile\shell\opennew\ddeexec\IfExec]@="*"
[HKEY_CLASSES_ROOT\htmlfile\shell\opennew\ddeexec\Topic]@="WWW_OpenURLNewWindow"
[HKEY_CLASSES_ROOT\htmlfile\shell\print]
[HKEY_CLASSES_ROOT\htmlfile\shell\print\command]@=hex(2):72,00,75,00,6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,\ 00,20,00,25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,73,00,79,00,\ 73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,00,68,00,74,00,6d,00,6c,\ 00,2e,00,64,00,6c,00,6c,00,2c,00,50,00,72,00,69,00,6e,00,74,00,48,00,54,00,\ 4d,00,4c,00,20,00,22,00,25,00,31,00,22,00,00,00
[HKEY_CLASSES_ROOT\htmlfile\shell\printto]
[HKEY_CLASSES_ROOT\htmlfile\shell\printto\command]@=hex(2):72,00,75,00,6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,\ 00,20,00,25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,73,00,79,00,\ 73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,00,68,00,74,00,6d,00,6c,\ 00,2e,00,64,00,6c,00,6c,00,2c,00,50,00,72,00,69,00,6e,00,74,00,48,00,54,00,\ 4d,00,4c,00,20,00,22,00,25,00,31,00,22,00,20,00,22,00,25,00,32,00,22,00,20,\ 00,22,00,25,00,33,00,22,00,20,00,22,00,25,00,34,00,22,00,00,00
[-HKEY_CLASSES_ROOT\htmlfile_FullWindowEmbed]
[HKEY_CLASSES_ROOT\htmlfile_FullWindowEmbed]@="HTML Plugin Document""AppUserModelID"="Microsoft.InternetExplorer.Default"
[HKEY_CLASSES_ROOT\htmlfile_FullWindowEmbed\CLSID]@="{25336921-03F9-11CF-8FD0-00AA00686F13}"
[-HKEY_CLASSES_ROOT\SystemFileAssociations\.htm]
[HKEY_CLASSES_ROOT\SystemFileAssociations\.htm]"PerceivedType"="document"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.htm\ShellEx]
[HKEY_CLASSES_ROOT\SystemFileAssociations\.htm\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]@="{f8b8412b-dea3-4130-b36c-5e8be73106ac}"
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm\OpenWithProgids]"htmlfile"=hex(0):
Wednesday, September 21, 2011
Play Spotify Over Airplay from Mac
Wednesday, September 14, 2011
Apple USB-Ethernet Adapter Drivers for Windows 7 64-bit [UPDATED x2]
Through a series of incredibly unbelievable events I ended up needing to use an Apple USB-Ethernet adapter on this fully loaded Alienware M17X laptop running Windows 7 64-bit. The rest of you will probably be approaching this from the much more believable but equally incredible event of installing Boot Camp on your new MacBook Air. Congratulations.
[UPDATE 1/9/2013]
The driver link below has been updated now that MobileMe is dead!
[UPDATE 9/14/2011]
The proper driver is now included in Boot Camp 4.0 from Apple. At the time of this writing the only way to get 4.0 is to download it from your Mac by running Boot Camp assistant and asking it to download Windows support files.
[/UPDATE]
Originally posted 8/10/2011...
Anyway, why these drivers are so hard to find is beyond me. Here’s the link to them on my iDisk. When iDisk becomes iCloud I will have to update this link, remind me if necessary. Apple USB-Ethernet Win7 64-bit Drivers
The .ini files were modified as taught by: YouGottaBeKiddingYou
Wednesday, September 7, 2011
Enable VNC Server in Mac OS X
This is so easy I can't believe it's taken me this long to find it. This works for Snow Leopard and Lion as far as I know, though I've only tested it on Lion.
Go this route:
Go this route:
- System Preferences
- Sharing
- Choose "Screen Sharing" and check the box to turn it on
- Click "Computer Settings..."
- Enable the "VNC views may control screen with password:" option and give it a password. Password length is limited to 8 characters.
Now you can connect to and control your Mac from your favorite VNC application, including free versions like Mocha VNC (Lite) for iPhone or Chicken of the VNC for Mac. I personally use Mocha VNC and it is a very good VNC app for my casual use. It is surprisingly fast over my home network Wireless-G iPhone 3GS to Gigabit-connected early-2007 iMac, and it works perfect with my iMac's dual monitor setup. It's the best Spotify "remote" I've found yet.
Tuesday, September 6, 2011
Part 4: Mac OS + Eclipse + OpenOCD + STM32 (ARM Cortex M3)
Intro
I really wanted to program and debug ARM processors from my Mac. This series of entries is a work in progress as I fine tune my setup for regular use. Be sure to read the full story:
Part 1: Getting Started, what we are going to do and what parts we are going to use.
Part 2: Laying the Foundation, getting all the parts installed.
Part 3: Connecting the Plumbing, hook up all the pieces and run it.
Part 4: Finishing Touches, troubleshooting and final thoughts.
Finishing Touches
I know that established, commercial software can often have more start-up issues than we care to deal with, especially when dealing with external development hardware. My experience is that open-source, home-grown, multiple-author, work-on-it-in-my-spare-time, no-warranty-expressed-or-implied solutions are even more difficult. I hope to someday build an Eclipse plug-in automate all of the things so my company can use a low maintenance open toolchain, but it's not going to happen right now! Instead, I will show you the troubles that I've seen and the solutions that worked for me. Deal? Deal.
OpenOCD External Tool Troubleshooting
Installing OpenOCD
I don't have any comments on installing OpenOCD since the MacPorts installation works so well.
External Tool Configuration Reminders
This setup is pretty easy from the Eclipse perspective since only one tab in the External Tools Configuration screen needs to be populated. Just be sure that your Location path is absolute and correct for your machine. Same goes for the paths used in Arguments fields. If you aren't using an Olimex ARM-USB-TINY-H JTAG or STM32 then be warned that you may need different flags on Arguments command, and that you will need to find the necessary .cfg files for your setup.
Target Connection Errors
A common thing that I ran into initially was not having my target connected and/or powered so OpenOCD couldn't connect. When running the OpenOCD External Tool from Eclipse I would get error messages in the Eclipse Console that looked like this:
Debugger Troubleshooting
No source available for ""
This being displayed in the source file area of the Debug Perspective happens for any number of reasons, but its always when something prevented the program download or run from happening properly. Go through your Console output and look for "Error:" messages.
Error: couldn't open test_rom.hex
This is thrown when the debugger can find your binary file (obviously). One reason is because you haven't build your program yet, or you did but then you cleaned the project before running the debugger. Another reason is that in your debugger configuration has the wrong path to your binary file in the "'Run' commands" section of the "Commands" tab. Your run command should look like the block below, but you need to edit it to reflect the correct relative path to your binary output file. The location is dependent on your project directory structure and the name of your output files which are dependent on what you called them and if your are compiling for Flash or RAM. Notice that the "symbol-file" path doesn't require the same path information. Why? I don't know right now. The two paths I'm talking about are in bold:
This was fun and I hope you were able to use it for your own work. Looking back it took quite a long time to figure out and a surprising amount of time to write about...there's a lot to do! All of this stuff certainly helps you appreciate the simplicity of IAR Embedded Workbench for ARM.
In the future I want to show you how to use IAR sample projects in our new toolchain, and I want to develop a quick-install method or plug-in of some kind to automate all of this work, as well as make it easy to change JTAG and target processor types. Should be fun! Please feel free to put questions/corrections/etc in the comments and I'll try to reply quickly.
I really wanted to program and debug ARM processors from my Mac. This series of entries is a work in progress as I fine tune my setup for regular use. Be sure to read the full story:
Part 1: Getting Started, what we are going to do and what parts we are going to use.
Part 2: Laying the Foundation, getting all the parts installed.
Part 3: Connecting the Plumbing, hook up all the pieces and run it.
Part 4: Finishing Touches, troubleshooting and final thoughts.
Finishing Touches
I know that established, commercial software can often have more start-up issues than we care to deal with, especially when dealing with external development hardware. My experience is that open-source, home-grown, multiple-author, work-on-it-in-my-spare-time, no-warranty-expressed-or-implied solutions are even more difficult. I hope to someday build an Eclipse plug-in automate all of the things so my company can use a low maintenance open toolchain, but it's not going to happen right now! Instead, I will show you the troubles that I've seen and the solutions that worked for me. Deal? Deal.
OpenOCD External Tool Troubleshooting
Installing OpenOCD
I don't have any comments on installing OpenOCD since the MacPorts installation works so well.
External Tool Configuration Reminders
This setup is pretty easy from the Eclipse perspective since only one tab in the External Tools Configuration screen needs to be populated. Just be sure that your Location path is absolute and correct for your machine. Same goes for the paths used in Arguments fields. If you aren't using an Olimex ARM-USB-TINY-H JTAG or STM32 then be warned that you may need different flags on Arguments command, and that you will need to find the necessary .cfg files for your setup.
Target Connection Errors
A common thing that I ran into initially was not having my target connected and/or powered so OpenOCD couldn't connect. When running the OpenOCD External Tool from Eclipse I would get error messages in the Eclipse Console that looked like this:
Open On-Chip Debugger 0.4.0 (2011-07-22-14:08)With a properly connected target you should see something less scary like:
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
1000 kHz
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
Info : max TCK change to: 30000 kHz
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
error: -100
Command handler execution failed
Open On-Chip Debugger 0.4.0 (2011-07-22-14:08)You might also see this displayed when starting OpenOCD:
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
1000 kHz
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
Info : max TCK change to: 30000 kHz
Info : clock speed 1000 kHz
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)
Info : stm32.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)
Error: JTAG-DP_STICKY_ERRORThis doesn't happen all the time, or very often at all, for me, but I have seen it, and it makes it impossible to start debugging when it does happen. I found a page at TinCanTools that said it is related to an OpenOCD 0.4.0 bug and it can be fixed by simply relaunching OpenOCD (the method I stumbled on) or by changing the OpenOCD launch arguments from:
-f /opt/local/share/openocd/scripts/interface/olimex-arm-usb-tiny-h.cfg -f /opt/local/share/openocd/scripts/target/stm32.cfg -c "init" -c "reset"to:
-f /opt/local/share/openocd/scripts/interface/olimex-arm-usb-tiny-h.cfg -f /opt/local/share/openocd/scripts/target/stm32.cfg -c "init" -c "reset init"I did that and it worked, but then I switched back to the original to test the theory and it still worked. YMMV.
Debugger Troubleshooting
No source available for ""
This being displayed in the source file area of the Debug Perspective happens for any number of reasons, but its always when something prevented the program download or run from happening properly. Go through your Console output and look for "Error:" messages.
Error: couldn't open test_rom.hex
This is thrown when the debugger can find your binary file (obviously). One reason is because you haven't build your program yet, or you did but then you cleaned the project before running the debugger. Another reason is that in your debugger configuration has the wrong path to your binary file in the "'Run' commands" section of the "Commands" tab. Your run command should look like the block below, but you need to edit it to reflect the correct relative path to your binary output file. The location is dependent on your project directory structure and the name of your output files which are dependent on what you called them and if your are compiling for Flash or RAM. Notice that the "symbol-file" path doesn't require the same path information. Why? I don't know right now. The two paths I'm talking about are in bold:
monitor soft_reset_haltConclusion
monitor wait_halt
monitor poll
monitor flash probe 0
monitor stm32x mass_erase 0
monitor flash write_bank 0 STM32Test2/test_rom.hex 0
monitor soft_reset_halt
symbol-file test_rom.elf
thbreak main
continue
This was fun and I hope you were able to use it for your own work. Looking back it took quite a long time to figure out and a surprising amount of time to write about...there's a lot to do! All of this stuff certainly helps you appreciate the simplicity of IAR Embedded Workbench for ARM.
In the future I want to show you how to use IAR sample projects in our new toolchain, and I want to develop a quick-install method or plug-in of some kind to automate all of this work, as well as make it easy to change JTAG and target processor types. Should be fun! Please feel free to put questions/corrections/etc in the comments and I'll try to reply quickly.
Labels:
ARM Cortex M3,
development,
Eclipse,
embedded,
Mac OS,
OpenOCD,
STM32
Thursday, September 1, 2011
Part 3: Mac OS + Eclipse + OpenOCD + STM32 (ARM Cortex M3)
Intro
I really wanted to program and debug ARM processors from my Mac. This series of entries is a work in progress as I fine tune my setup for regular use. Be sure to read the full story:
Part 1: Getting Started, what we are going to do and what parts we are going to use.
Part 2: Laying the Foundation, getting all the parts installed.
Part 3: Connecting the Plumbing, hook up all the pieces and run it.
Part 4: Finishing Touches, troubleshooting and final thoughts.
Connecting the Plumbing
So at this point you have all the software and tools installed and it is time to hook everything together. I considered an infographic/flowchart to describe it all, but maybe later. For now, consider this
Configure OpenOCD as an External Tool for Eclipse
Set the Debugger Configuration for Eclipse
Ok, that was a long post, I went further than I expected, but ideally you are up and running now. I'm going to leave it here for today, but next time I'll get into some troubleshooting and configuration tweaking items. Part 4: Finishing Touches.
I really wanted to program and debug ARM processors from my Mac. This series of entries is a work in progress as I fine tune my setup for regular use. Be sure to read the full story:
Part 1: Getting Started, what we are going to do and what parts we are going to use.
Part 2: Laying the Foundation, getting all the parts installed.
Part 3: Connecting the Plumbing, hook up all the pieces and run it.
Part 4: Finishing Touches, troubleshooting and final thoughts.
Connecting the Plumbing
So at this point you have all the software and tools installed and it is time to hook everything together. I considered an infographic/flowchart to describe it all, but maybe later. For now, consider this
- Eclipse uses OpenOCD to make the bridge to the hardware
- Eclipse then uses a makefile in your project to invoke YAGARTO to compile your source into binary and debugger files
- Eclipse then uses YAGARTO's GDB via Zylin to send the binary file over the OpenOCD bridge to the hardware using a simple (JTAG and chip dependent) OpenOCD script that I'll share with you
- Now that your microcontroller is programmed Eclipse uses its built in debugger features to control YAGARTO's GDB via Zylin to control and debug your device over the OpenOCD bridge
As you can see, there is a lot of interaction between the parts, but after initial setup the complexity will be reduced to a three step process:
- Build Project.
- Start OpenOCD. Even better: you only have to do this once per session.
- Start Debugging. Automatically downloads the latest binaries to your target each time.
Create a Test Project
- YAGARTO's example page has a nice starter project. It is their STM32Test project for the STM32-P103 board, but really its so simple it will work for anything. I modified the makefile to suit my setup and preferences, and I'll show you how to do it, too. Download it and extract it, doesn't matter where you put it.
- Time to import the project into Eclipse. Go File->New->C Project. Name it STM32Test for consistency, Project Type is "Makefile project"->Empty Project, Toolchain setting is "-- Other Toolchain --". Hit Finish. My project is called STM32Test2 since I'm redoing this for you.
- In Project Explorer, right-click on your new project name and click "Import...". Set the Import source to be "General"->File System, then hit Next. The From Directory is where you extracted the STM32Test project to. You want to import everything except for the root folder, see the image below (click to expand). To do this, expand the root folder, choose the three sub-folders, then click on the root folder to view its files and select the makefile. The Into Folder path is set to your new project path because that was the one you right-clicked on to start the import. Press Finish to complete the import.
- Now that the files are in your project expand the project folder in the Project Explorer of Eclipse so you can see the contents. Open the makefile by double-clicking on it.
- Find the makefile line near the top that begins with TRGT. Since Eclipse doesn't like to respect PATH variables I changed this line to reflect the absolute path to the YAGARTO compiler tools: TRGT = /Developer/YAGARTO/yagarto-4.6.0/bin/arm-none-eabi-
- My STM32 toolchain configuration wants binary files instead of hex files, so I went down a five lines and changed the BIN entry to be: BIN = $(CP) -O binary
- I also wanted to run the program from the Flash memory of my micro so I scrolled down further and changed this setting: RUN_FROM_FLASH = 1
- Note that later when you add more source files to you project you will need to add them to the source files list in the makefile. Header files are found automatically as long as they are in the project folder.
- Ok, that's it, save the makefile, then build your project from the Project menu or just by right-clicking on your project in Project Explorer. The Console window should show all the of the compiler commands rushing by then three new files should appear in your project: test_rom.elf (debugger data file), test_rom.hex (the image for your micro, its actually binary), and test_rom.map (like any map file, showing what
iswill be in the various memory areas of your micro).
- Look for External Tools icon on the toolbar and hit the drop-down arrow, or go to the Run menu -> External Tools, and choose "External Tools Configuration".
- On the left side of theExternal Tools Configuration dialog box click on "Program", if it's not already selected, and the right-side pane will show you what you can do with this dialog box.
- Choose the New option and the right-side pane will show you details of your new tool configuration.
- First thing to note is that the Helios release of Eclipse does not remember your global or project prefs settings for environment PATH variables. So, where ever I use file paths I put in the absolute path rather than using relative paths and relying on the environment setting. You can either use the latest version of Eclipse or modify your Mac's PATH variable if you don't like this. I understand the lack of portability, but I blame it on Eclipse and my laziness of not upgrading.
- Location is the path to the executable of the tool, and that tool is OpenOCD
- Arguments setup OpenOCD for your particular toolchain, my case is the Olimex ARM-USB-TINY-H and the ST Micro STM32. The OpenOCD scripts folder contains quite a few different options here, but be aware that changing these options may result in necessary changes elsewhere in our IDE setup.
- The "Main" tab is all you need to worry about here. Fill in your new tool configuration as shown in the image below (click to enlarge), then press Apply then Close. You can run this external tool from the toolbar by clicking on the drop-down arrow of External Tools and finding the tool name (ARM-USB-TINY-H Start), you may have to Run the tool from inside its configuration window the first time to get it to appear in the drop-down menu. So, make sure that your JTAG is plugged into USB and plugged into your target, and make sure your target is powered, then run it!
- The console should show lots of red text (red doesn't mean error), and it should look something like this:
Open On-Chip Debugger 0.4.0 (2011-07-22-14:08)Licensed under GNU GPL v2For bug reports, readhttp://openocd.berlios.de/doc/doxygen/bugs.html1000 kHzjtag_nsrst_delay: 100jtag_ntrst_delay: 100Info : max TCK change to: 30000 kHzInfo : clock speed 1000 kHzInfo : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)Info : stm32.cpu: hardware has 6 breakpoints, 4 watchpointsInfo : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)
- Find the Debugger icon on the toolbar and hit the drop-down arrow, or go to the Run menu, and choose "Debug Configurations".
- Since you've already installed the Zylin CDT Plugin you will have "Zylin Embedded Debug (Native)" in the list on the left side. Select this and press the "New launch configuration" button at the top of the list.
- For this setup there are three tabs that we are interested in: Main, Debugger, and Commands.
- Main Tab: Thus far in my usage I've needed a separate debugger config for each project because there are pathnames hard coded into the debugger commands, I'm sure this can be improved on, but not yet. So, at the very top of the dialog box we are going to call this setup "STM32TestROM". Then put in the optional project name, either browse for your new project or type in the name STM32Test (STM32Test2 in my case). The C/C++ Application is the .elf file created by the project build, which you can search or browse for, or just type in "test_rom.elf". Note that since we pointed it at the "_rom" file this config is specific for running our program in Flash and not RAM, since our makefile uses "_ram" output filenames for non-Flash compiled programs. Feel free to customize.
- Debugger Tab: Debugger is "Embedded GDB", Selected "Stop on startup at: " and put "main" in the text box. GDB debugger absolute path (for me) is: "/Developer/YAGARTO/yagarto-4.6.0/bin/arm-none-eabi-gdb". Clear out the GDB command file field. GDB command set: standard. Protocol: mi.
- Commands Tab, 'Initialize' commands:
- Commands Tab, 'Run' commands:
- That's it. Apply. Close.
- The OpenOCD JTAG interface is already running from before, so now we just need to run the debugger. The Debug toolbar icon offers the drop-down arrow where you can find your debug configuration name. Again, the first time you run it you may have to go click "Debug" from inside the debug configuration setup window to get it to appear on the toolbar menu. When you do this Eclipse will automatically switch the IDE to the Debug Perspective so you can see your typical debugger view and tools like Disassembly and Step controls. Eclipse has a powerful debugger that even allows you to hover the mouse over variables in your source code and read the realtime values when the program is halted.
target remote localhost:3333
monitor soft_reset_halt
monitor soft_reset_halt
monitor wait_halt
monitor poll
monitor flash probe 0
monitor stm32x mass_erase 0
monitor flash write_bank 0 STM32Test2/test_rom.hex 0
monitor soft_reset_halt
symbol-file test_rom.elf
thbreak main
continue
Ok, that was a long post, I went further than I expected, but ideally you are up and running now. I'm going to leave it here for today, but next time I'll get into some troubleshooting and configuration tweaking items. Part 4: Finishing Touches.
Labels:
ARM Cortex M3,
development,
Eclipse,
embedded,
Mac OS,
OpenOCD,
STM32
Wednesday, August 31, 2011
Part 2: Mac OS + Eclipse + OpenOCD + STM32 (ARM Cortex M3)
Intro
I really wanted to program and debug ARM processors from my Mac. This series of entries is a work in progress as I fine tune my setup for regular use. Be sure to read the full story:
Part 1: Getting Started, what we are going to do and what parts we are going to use.I really wanted to program and debug ARM processors from my Mac. This series of entries is a work in progress as I fine tune my setup for regular use. Be sure to read the full story:
Part 2: Laying the Foundation, getting all the parts installed.
Part 3: Connecting the Plumbing, hook up all the pieces and run it.
Part 4: Finishing Touches, troubleshooting and final thoughts.
Laying the Foundation
We are going to work (more or less) from the bottom to the top of the list of pieces shown in Part 1.
OpenOCD Installation
First thing to do is get the hardware interface installed, that is OpenOCD, for which you will need to install MacPorts, if you want to do it my way.- Install MacPorts. The MacPorts site has very good instructions on how to do that. I am running XCode 3.2.5 on OS X Lion with no problems, although the MacPorts page says to use 4.x. For those of you unfamiliar with MacPorts it is a very powerful tool similar to apt-get on Linux. MacPorts removes you from the task of compiling source code and finding all of the required dependencies for your open source software of choice. Don't be scared, embrace Terminal and realize how much more your Mac can do. Use the search feature on MacPorts' site and see how much stuff is available. I don't want to sound like a command-line freak, I'm not, I'd much rather download a sweet DMG image containing an installer and prebuilt binaries, but alas.
- Use MacPorts to install OpenOCD. The Terminal command is "sudo port install openocd" where sudo gives admin rights to the port command (MacPorts), and install tells MacPorts to install openocd, as opposed to uninstalling. The openocd name comes from the MacPorts description for OpenOCD. If you pay attention to the dependencies you'll see that libftdi gets installed, this is the driver for the FTDI USB-UART chip inside the Olimex JTAG (and many other budget JTAGs). You might end up waiting a while for this step to complete, depending on what is already installed on your machine, internet speed, etc. I'm talking like 5's or 10's of minutes. When it's done there won't be any new icon in your Applications folder or anything, but there will be bunch of stuff in your /opt/local/ directory. /opt/local/bin/openocd is the executable and /opt/local/share/openocd/ contains a number of different scripts to configure OpenOCD for various JTAGs and various targets (processors).
YAGARTO Installation
Next, we install YAGARTO which is a plug-in to the GDB debugger which allows the GDB to work with ARM processors.
- Go get the goods, and make sure you download from the Mac OS X section and not the Windows section. I used the 29 Apr 2011 version with GCC-4.6.0 and GDB-7.2. YAGARTO means Yet Another GNU ARM Toolchain. Eclipse uses this piece to cross-compile your code for the ARM on your Mac, generate the binary file used program your chip, and generate debugger data. It also uses this piece, via the Zylin add-in, to run the debugger.
- Install as per the ReadMe file included in the DMG: To install the toolchain copy the YAGARTO installer (yagarto-4.6.0, the blue box icon) to the folder where you want to install it. Start the installer by double clicking on it. I chose to place the installer at /Developer/YAGARTO/ so you can copy if you want to use my examples directly.
- The installer will simply create a directory structure under the path where you put the installer. Again, no fancy icons in your Applications folder, just some crazy sounding filenames waiting patiently for Eclipse to exercise them. The business end is at /Developer/YAGARTO/yagarto-4.6.0/bin and this is a path that will be useful to know in the near future.
Eclipse Installation
If you haven't heard of Eclipse then I'm surprised you made it this far. Eclipse is the ultimate GUI/IDE for just about every purpose. Personally I've used it for Java, Actionscript, Python, and now C for the ARM. Anyway,
- Download the Eclipse IDE and the C/C++ Developer Tooling (CDT). These are separate downloads and you need them both, unless you want to install Eclipse then add in the CDT via the "Help->Install New Software..." feature. I am using Helios SR2 with CDT 7.0.2. I haven't upgraded to Indigo yet, but I'm sure this process is very similar for both versions.
Zylin Installation
Zylin fills the gap between Eclipse and OpenOCD for the debugging side of things.
- The Zylin CDT is open source and there website is here, although there is nothing you need to download from there.
- What you need to do is fire up Eclipse, and use the Help->Install New Software... feature.
- To the right of the "Work with:" text box click the "Add..." button to bring up the "Add Repository" window. Name it something like "Zylin CDT" and put in "http://opensource.zylin.com/zylincdt" for the location. This location information came from the Zylin website.
- After some thinking "Zylin Embedded CDT" should show up in the big window. Check the box next to it then hit "Next" a couple times, accept the license terms, and hit "Finish." It might take a few minutes to do its thing, but wait for it, approve any unsigned software installation, then restart Eclipse when prompted.
Next Step
We have the foundation laid, so now its on to Part 3: Connect the Plumbing.
Labels:
ARM Cortex M3,
development,
Eclipse,
embedded,
Mac OS,
OpenOCD,
STM32
Tuesday, August 30, 2011
Part 1: Mac OS + Eclipse + OpenOCD + STM32 (ARM Cortex M3)
Intro
I really wanted to program and debug ARM processors from my Mac. This series of entries is a work in progress as I fine tune my setup for regular use. Be sure to read the full story:Part 1: Getting Started, what we are going to do and what parts we are going to use.
Part 2: Laying the Foundation, getting all the parts installed.
Part 3: Connecting the Plumbing, hook up all the pieces and run it.
Part 4: Finishing Touches, troubleshooting and final thoughts.
My motivation: I am an electrical engineer that uses a Mac. It's a long story, but now that I'm here I'd rather not switch operating systems via Boot Camp multiple times per day. I admit that it's not THAT hard to reboot in Windows, nor does it take THAT long, and I'm sure I've spent more time on this research project than I'll ever save. However, I wanted to know more about open source embedded dev tools and this was a great way to find out if its worth it. Is it worth it? I don't know yet. I'll try to get comfortable debugging the STM32 in Eclipse and report back. If it works out well then I'll try the STM8 with its SWIM interface and get all of my development under one IDE umbrella.
Where I came from: IAR Embedded Workbench for ARM + IAR J-Link. This is great software and hardware, no doubt. Very easy to use, supports every processor I've ever heard of, and my chip vendor of choice (ST Micro) supplies great sample projects in IAR format. But it doesn't run on Mac, and its not cheap (even if you use the free 16K version of EWARM the J-Link will cost you a lot). For some the cost is irrelevant, but if you switch chips a lot, if you're a student, or if you have multiple developers who just want to experiment then maybe this article is for you.
Bill of Materials
I am going to show you how to establish an embedded processor programming and debugging ecosystem using as much free and open source stuff as I reasonably can, and do it all on a Mac. Here are the pieces:
- STM32 development board with JTAG interface. I am using an STM32F103 on my own PCB design, you can use your own platform or buy any of the many development kits out there.
- Olimex ARM-USB-TINY-H JTAG device (buy it from Mouser.com for about $50).
- Mac OS X Lion 10.7.1
- Eclipse IDE with C/C++ Developer Tooling (CDT). These are separate downloads and you need them both. I am using Helios SR2 with CDT 7.0.2. I haven't upgraded to Indigo yet, but I'm sure the process is very similar. You will need a few helper pieces as well, described below.
- YAGARTO means Yet Another GNU ARM Toolchain. I used the 29 Apr 2011 version with GCC-4.6.0 and GDB-7.2. Eclipse uses this piece to cross-compile your code for the ARM on your Mac, generate the binary file used program your chip, and generate debugger data.
- Zylin Embedded CDT is an open source plug-in for GDB that magically fills the gap between Eclipse and OpenOCD. It gets installed into Eclipse.
- OpenOCD the Open On-Chip Debugger v0.4.0. This lets GDB talk to the JTAG hardware over USB. Hadn't been updated in over a year until I start using it then they release v0.5.0 : ) No hard feelings, but you should be aware that many of the OpenOCD server commands changed with the new version, so to use what I've done you should get the old one, or wait (potentially for eternity) for me to update to the latest.
- I used the MacPorts method to install OpenOCD, and I suggest you do the same if you are fairly new to the command line of Mac OS X or Linux. Heck, even if you're not new to the nitty gritty you should use it, I think MacPorts is great, and it's the method I'll show.
If it wasn't for the great open source community out there I never would have accomplished my goal. It took the aggregation of multiple how-to guides and forums for me to put together my specific solution, so I will reference those resources but also publish sufficient relavent information here.
First Things First
First thing to do is get the hardware interface installed, so go on to Part 2: Lay the Foundation.
Labels:
ARM Cortex M3,
development,
Eclipse,
embedded,
Mac OS,
OpenOCD,
STM32
Saturday, August 6, 2011
Get Mac OS X Lion to Work with NTFS [UPDATED]
From a comment in a neighboring blog I successfully got my NTFS drives to mount again after upgrading to Lion. There are paid solutions to NTFS on Lion, but I use Windows-formatted drives so rarely that I can't justify $39.
[UPDATE Aug 31, 2011]
MacFUSE 2.2 has been released with Lion compatibility: There is a 2.2.1 out in the wild, but many have reported that it makes your CPU run like crazy. 2.2.x is expected to be the last MacFUSE release with the new Fuse4X project taking over, but not yet useful for NTFS, as far as I can tell.
Anyway, install NTFS-3G: http://sourceforge.net/projects/catacombae/files/NTFS-3G%20for%20Mac%20OS%20X/2010.10.2/ntfs-3g-2010.10.2-macosx.dmg/download
Then install MacFUSE 2.2: http://www.tuxera.com/mac/macfuse/MacFUSE-Tuxera-2.2.dmg
Its working great for me and not throwing that weird 15.00000 second timeout error that MacFUSE 2.0.3 was doing. and is simpler than the original method I posted.
[/UPDATE]
Old way...
How to do it:
1. Install the latest version of MacFUSE: http://macfuse.googlecode.com/files/MacFUSE-2.0.3%2C2.dmg
1b. If you don't already have it then install the latest version of NTFS-3G http://sourceforge.net/projects/catacombae/files/NTFS-3G%20for%20Mac%20OS%20X/2010.10.2/ntfs-3g-2010.10.2-macosx.dmg/download
2. Install the lastest MacFUSE core of Tuxera (aka NTFS-3G): Install http://www.tuxera.com/mac/macfuse-core-10.5-2.1.9.dmg
3. Install the 64-bit BETA version of the MacFUSE preference pane: http://content.wuala.com/contents/grahamperrin/public/2010/07/31/a/MacFUSE.prefPane-2.0-64-bit-2009-09-10.zip?dl=1
Restart as necessary to make it all happy and stuff.
Enjoy!
Credits: Commenter David @ http://www.blogger.com/comment.g?blogID=3156578562014006371&postID=2651866977865603342
Subscribe to:
Comments (Atom)

