Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Build Configuration - Upload to specific port (Read 6004 times)
Flydroid
Newbies
*
Offline


Posts: 4
Joined: Sep 15th, 2015
Build Configuration - Upload to specific port
Sep 15th, 2015 at 3:47pm
Print Post  
Hello everyone,

I have four teensy 3.1 connected together over CAN.
My project has a define for a master module and for a measurement module. One of the the teensy is getting flashed with the master, all three others with the measurement define. 
After researching the build configuration options VM offers i could set up a build configuration for the master and the the measurement. This way i can easily edit my code and update the teensys. 
As all four teensys are connect to the PC i have 4 available com ports. 
Is it possible to define a specific com port in the "Micro General" Defines field for each of my configurations?

I know that the build property i want to manipulate is serial.port.num.
« Last Edit: Sep 15th, 2015 at 3:48pm by Flydroid »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Build Configuration - Upload to specific port
Reply #1 - Sep 15th, 2015 at 4:07pm
Print Post  
Hi,

The upload port is used outside of the build commands so the defines won't help.

Currently you can only set a port for each project but it wouldn't be too modify Visual Micro to optionally support an override per config.

I'll try to look at it during the next week.
« Last Edit: Sep 15th, 2015 at 4:07pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Flydroid
Newbies
*
Offline


Posts: 4
Joined: Sep 15th, 2015
Re: Build Configuration - Upload to specific port
Reply #2 - Sep 16th, 2015 at 9:36am
Print Post  
Hi Tim,

Thanks for your dedication.
This would be a great feature!

For know i think i can do this with TyQT by Koromix https://github.com/Koromix/ty
A batch file with the commands for TyQT which uploads the appropriate firmware to all of my connected teensys. 
I can even add a Button for this in VSĀ  Cheesy

Now i'm how i can streamline this even more. Here you wrote that the .hex could be copied back to project source folder. But i can't find an option for this in the VM settings.

Also I tried to compile with the msbuild command. It does run but doen't seem to get it right. I read somewhere on the forums here, where you said that you could compile the solution with the standart vs build makro.
« Last Edit: Sep 16th, 2015 at 10:07am by Flydroid »  
Back to top
 
IP Logged
 
Robert Norton
Newbies
*
Offline


Posts: 2
Joined: Sep 19th, 2015
Re: Build Configuration - Upload to specific port
Reply #3 - Sep 19th, 2015 at 3:32pm
Print Post  
Or you could have a special hardware pin or a byte in an eeprom to select between master and slaves. This way you could keep a single source code and have an automatic selection of the master.
I did this in my project, and this works fine.
  
Back to top
 
IP Logged
 
Flydroid
Newbies
*
Offline


Posts: 4
Joined: Sep 15th, 2015
Re: Build Configuration - Upload to specific port
Reply #4 - Sep 21st, 2015 at 2:16pm
Print Post  
Thanks for the input Robert. 
I will try it. Afaik that issue with EEPROM wipe on upload has  been resolved on the Teensy some time ago but i haven't used eeprom before... 
And i don't really know, how everythink works with the addtional code, which is just skipped everytime, as there are some timing critical stuff is going on.

  
Back to top
 
IP Logged
 
Flydroid
Newbies
*
Offline


Posts: 4
Joined: Sep 15th, 2015
Re: Build Configuration - Upload to specific port
Reply #5 - Nov 2nd, 2015 at 6:28pm
Print Post  
@Tim did you get a look at the specific port for a specific configuaration issue?

Also should as far as you know the Batch Build function of visual studio work with visual micro?

My configurations compile fine each of them but not during batch build. The MSBuild cmd gives the same result.
Output from the Buildlog in VS.
Code
Select All
------ Build started: Project: AKXLogger, Configuration: Messmodul1 x64 ------
  canbus.cpp
d:\owncloud2\jonathan akaflieg\ak_logger\software\akxlogger\canbus.h(13): fatal error C1083: Cannot open include file: 'FlexCAN.h': No such file or directory
  sensor.cpp
d:\owncloud2\jonathan akaflieg\ak_logger\software\akxlogger\sensor.h(17): fatal error C1083: Cannot open include file: 'i2c_t3.h': No such file or directory
  serial.cpp
d:\owncloud2\jonathan akaflieg\ak_logger\software\akxlogger\sensor.h(17): fatal error C1083: Cannot open include file: 'i2c_t3.h': No such file or directory
------ Build started: Project: AKXLogger, Configuration: Master x64 ------
  canbus.cpp
d:\owncloud2\jonathan akaflieg\ak_logger\software\akxlogger\canbus.h(13): fatal error C1083: Cannot open include file: 'FlexCAN.h': No such file or directory
  sensor.cpp
d:\owncloud2\jonathan akaflieg\ak_logger\software\akxlogger\sensor.h(17): fatal error C1083: Cannot open include file: 'i2c_t3.h': No such file or directory
  serial.cpp
d:\owncloud2\jonathan akaflieg\ak_logger\software\akxlogger\sensor.h(17): fatal error C1083: Cannot open include file: 'i2c_t3.h': No such file or directory
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
 

« Last Edit: Nov 2nd, 2015 at 7:05pm by Flydroid »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Build Configuration - Upload to specific port
Reply #6 - Nov 2nd, 2015 at 8:51pm
Print Post  
Hi,

Not done the port/config yet

If you have a non-arduino project as your startup project then visual studio will attempt to build your project as a windows program. That's the error you are seeing. Click "Build>Configuration Manager" and clear the "Build" option for your Arduino project.

If you have an arduino project as a startup project then visual micro will attempt to build all arduino projects ignoring the windows project.

It's not currently possible to have one build that builds some arduino and some other types of projects together although they can each be compiled individually regardless of type.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint