Atmel Studio: Make project device serial-number agnostic - atmel

My colleagues and I are using AtmelStudio v7.0.1645 to develop software for the Atmel SAM V71 Xplained Ultra (ATSAMV71Q21). We have a shared repository for code.
We have several of these boards and as a result we run into an issue when programming the board.
The .cproj file, under version control, has the serial number of the specific board placed in the ToolNumber field.
<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="14.0">
<PropertyGroup>
...
<avrtool>com.atmel.avrdbg.tool.edbg</avrtool>
<avrtoolserialnumber>ATML2000...</avrtoolserialnumber>
<avrtoolinterface>SWD</avrtoolinterface>
<com_atmel_avrdbg_tool_edbg>
<ToolOptions>
<InterfaceProperties>
<SwdClock>2000000</SwdClock>
</InterfaceProperties>
<InterfaceName>SWD</InterfaceName>
</ToolOptions>
<ToolType>com.atmel.avrdbg.tool.edbg</ToolType>
<ToolNumber>ATML2000...</ToolNumber>
<ToolName>EDBG</ToolName>
</com_atmel_avrdbg_tool_edbg>
<avrtoolinterfaceclock>2000000</avrtoolinterfaceclock>
</PropertyGroup>
</Project>
At present if the field value is wrong then programming the board fails with the error: [ERROR] The tool specified has been disconnected. Please reconnect the tool or choose another one
The serial number should be user-specific, and should not be included in source control. How can Atmel Studio be made to work that way?

May as well answer my own question...
I decided the solution was to use a few scripts, written using Python and Bash, to strip out the user-specific elements when committing; they are restored after the commit too.
Code is on GitHub: https://github.com/GRArmstrong/atmel-studio-git-hooks

Related

MSCOMCTL Treeview OCX replacement for OpenEdge 64 bits

We started to test OE12.4 to migrate our systems from 11.7, but 12.4 licenses doesn't include 32-bit versions of PROWIN32 and AppBuilder anymore. Therefore, we're unable to update and develop new applications using MSCOMCTL Treeview OCX, as we did until now. This isn't a problem for future programs, but for migration it is. We're unable to run programs from PROWIN (x64) which uses MSCOMCTL Treeview OCX's, as well as all other programs who uses 32-bit DLL's. The programs compile like a charm, flawless, but doesn't execute.
I tried to register MSCOMCTL OCX throug CMD in c:\windows\system32 directory but, as expected, it didn't worked. For this DLL, as a discontinued resource, Microsoft doesn't provide a 64-bit compiled code.
I'm aware that exist a open project called PureAblTreeView, which works pretty good and doesn't rely on DLL's dependency, but this object was built on ADM2 and the majority of my old programs are ADM1. Therefore, I'm unable to use that solution without rewrite my programs, which can't be done at this time. I even tried to "rebuid" PureAblTreeView as a SmartV8Object, but it didn't worked. Too many differences to be solved and too little time to achieve a running solution.
Is there any workaround for this situation, besides rebuild the programs?
Thank you all in advance.
If I am reading Knowledge Base article 000153835 correctly, then your issue should have been addressed in 12.4:
The 12.2.5 update and the 12.4 release have re-introduced the
AppBuilder to 32-bit OpenEdge. It is now available to run from the
installed Program Group icons.

Is there a way to use GitVersion to "version stamp" an Arduino project during build?

I create firmware for devices based on Arduino hardware. I use Visual Studio and the Visual Micro add-in for Arduino support within Visual Studio.
It would be handy to use GitVersion (or something similar) to have a version created for each build. However, Arduino projects use their own build system and don't rely on MSBuild.
Does anyone know of a way to "hook" GitVersion into a Visual Micro Arduino build?
It is unlikely that you will get anything that will "just" do this for you.
Instead, you are likely going to want to use some form of build system to do this work for you.
For example, I use GitVersion to version my Visual Studio Code Extension projects. There is no direct way to bump the package.json file that is used there from GitVersion. Instead, I use GitVersion to assert what the version number is, and then I use a tool called MagicChunks to take this version number and put it into the correct place.
This is all orchestrated using a tool called Cake to do this work.
So essentially, what I am saying is, use GitVersion to "get" the version number, and then use another tool to "put" that number where it needs to be. This can be done using whatever orchestration tool makes the most sense for you, and your project.

Is there any basic tutorial on how to compile software from source under windows

I'm a beginner on open source world.
I can compile my own C++ code in VS 2015. but, I have little knowledge about compiling open source code. I can't even find a project file of that.
Anyway, I'd like to compile Sigil 0.9.4 version from source. My system is Windows 10 64 bit, and Qt 5.6.0 is installed. I've been looking for any basic guide for that but I haven't found yet.
I have downloaded a source code zip file from the link
https://github.com/Sigil-Ebook/Sigil/releases
And I have no idea what's the difference between Sigil-0.9.4-Code.zip and Source code (zip).
Which one should I download to compile?
Intuitively, I used 'importing project' in Qt but I get message 'no rule to make target all. stop'
Any instructions for that?
Thank you in advance!!!
For compilation you will need to use CMake. I recommend going through their web-site and read about it.
If you look at the source repository of the software you are trying to build (Sigil), you will see the root folder contains CMakeLists.txt. This is the file that will tell cmake program how to build and configure the software.
If you are planning to use Qt as your IDE, I recommend to download and install cmake first. Then make sure, Qt's toolchain is set up properly with the cmake. Then all you have to do is to open that CMakeLists.txt in Qt (see more details in the aforementioned link). Also, you can find plenty other tutorials on how to use cmake to compile your projects.
Hope this will help you get started.

How do I remove a library from the arduino environment?

In the Arduino GUI on windows, if I click on Sketch --> Import Library, at the bottom of the menu there is a section called "Contributed".
Unfortunately, I had misclicked and added a library I did not want to that list.
How can I remove it from that list?
The help page only mentions that "If a sketch no longer needs a library, simply delete its #include statements from the top of your code" but it does not mention how to remove the library from the list of contributed libraries.
Go to your Arduino documents directory; inside you will find a directory named "Libraries". The imported library directory will be there. Just delete it and restart the Arduino app.
Your Arduino library folder should look like this (on Windows):
My Documents\Arduino\libraries\ArduinoParty\ArduinoParty.cpp
My Documents\Arduino\libraries\ArduinoParty\ArduinoParty.h
My Documents\Arduino\libraries\ArduinoParty\examples
....
or like this (on Mac and Linux):
Documents/Arduino/libraries/ArduinoParty/ArduinoParty.cpp
Documents/Arduino/libraries/ArduinoParty/ArduinoParty.h
Documents/Arduino/libraries/ArduinoParty/examples
The only issue with unused libraries is the trivial amount of disk space they use. They aren't loaded automatically so don't take up any application memory of the Arduino IDE.
Quote from official documentation as of August 2013:
User-created libraries as of version 0017 go in a subdirectory of your default sketch directory. For example, on OSX, the new directory would be ~/Documents/Arduino/libraries/. On Windows, it would be My Documents\Arduino\libraries\. To add your own library, create a new directory in the libraries directory with the name of your library. The folder should contain a C or C++ file with your code and a header file with your function and variable declarations. It will then appear in the Sketch | Import Library menu in the Arduino IDE.
To remove a library, stop the Arduino IDE and remove the library directory from the aforementioned location.
The answer is only valid if you have not changed the "Sketchbook Location" field in Preferences. So, first, you need to open the Arduino IDE and go to the menu
"File -> Preferences"
In the dialog, look at the field "Sketchbook Location" and open the corresponding folder.
The "libraries" folder in inside.
I have found that from version 1.8.4 on, the libraries can be found in ~/Arduino/Libraries. Hope this helps anyone else.
I had to look for them in C:\Users\Dell\AppData\Local\Arduino15\
I had to take help from the "date created" and "date modified" attributes to identify which libraries to delete.
But the names still show in the IDE... But it is something I can live with for now.
For others who are looking to remove a built-in library, the route is to get into PackageContents -> Java -> libraries.
BUT : IT MAKES NO SENSE TO ELIMINATE LIBRARIES inside the app, they don't take space, don't have any influence on performance, and if you don't know what you are doing, you can harm the program.
I did it because Arduino told me about libraries to update, showing then a board I don't have, and when saying ok it wanted to install a lot of new dependencies - I just felt forced to something I don't want, so I deinstalled that board.
In Elegoo Super Starter Kit, Part 2, Lesson 2.12, IR Receiver Module, I hit the problem that the lesson's IRremote library has a hard conflict with the built-in Arduino RobotIRremote library. I am using the Win10 IDE App, and it was non-trivial to "move the RobotIRremote" folder like the pre-Win10 instructions said. The built-in Libraries are saved at a path like: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\libraries
You won't be able to see WindowsApps unless you show hidden files, and you can't do anything in that folder structure until you are the owner. Carefully follow these directions to make that happen: https://www.youtube.com/watch?v=PmrOzBDZTzw
After hours of frustration, the process above finally resulted in success for me. Elegoo gets an F+ for modern instructions on this lesson.
as of 1.8.X IDE
C:\Users***\Documents\Arduino\Libraries\
My solution is low-tech but effective so I want to share:
create a folder for disabled libraries next to libraries
move libraries here to disable, swap back in to re-enable

How to get FreeRTOS on MSP430 using CCE?

I'd like to get FreeRTOS running on an MSP430 processor using Code Composer Essentials v3.1. I found an example of just this at http://www.westmorelandengineering.com/toc.htm. Specifically I’m working with FreeRTOS_Demo.zip, the top one. When I try to open it with CCE I get an error that the workspace "was not created by this version of Code Composer". So I tried to import the project and I get an error "The Managed Make project could not be read because of the following error: Project type com.ti.ccstudio.managedbuild.ui.programTargetID not found. Managed Make functionality will not be available for this project."
I’m wondering what my problem is and how I can get the project to build, or should I go about this a different way?
FreeRTOS support many, many, many chips and many, many, many compilers. Anything that is not standard C code is kept in a port layer.
The next FreeRTOS release (V7, out in the next couple of weeks and already available in the SVN repository) includes a CCS4 port and demo for the MSP430F5438 (MSP430X core).
Regards.
I was told that TI's CCS compiler suite (used in CCE/CCS) will not build the FreeRTOS sources because the FreeRTOS sources include stuff written in gnu assembler syntax (file extension .s is common between CCS asm and Gnu asm, but syntax is not the same). Until FreeRTOS is "ported" to the CCS compiler suite, your best bet is to use the full CCS with the GCC compiler instead of the CCS compiler.
reviving a zombie thread... not sure if CCE is even relevant now... you can get CCS 5.3 with code-size limited free MSP430 support.
I recently ported FreeRTOS to the CC430 using the new MP430Ware driver library from TI and Code Composer Studio 5.3, get it here:
http://www.freertos.org/Interactive_Frames/Open_Frames.html?http://interactive.freertos.org/entries/22894958-cc430f5137-ccs-5-3

Resources