How to stop microchip / atmel studio from linking to files in other projects - Page 1
Forum section: electronics / general

author: Simon
author_rank: Unknown
timestamp: February 28, 2024, 11:48:02 am
content: i have a problem with microchip studio. I take a copy of a project and change the folder name. Now when I go through this project I right click on something and select go to definition or whatever and it pulls files from the other folder of the "archived" copy.There are no references that i can see to the projects path that could have been copied over. What the hell is going on with this garbage?

author: nali
author_rank: Frequent Contributor
timestamp: February 28, 2024, 02:35:53 pm
content: I started out with Studio last week. After a few days messing about it's now uninstalled and replaced with MPLAB/X.From AVRFreaks:Quote

author: ejeffrey
author_rank: Super Contributor
timestamp: February 28, 2024, 02:49:11 pm
content: I have never found an IDE that handles this acceptably. Some do a better job than others but all of them ultimately fail. The only way around it is to not copy projects. Instead create a new project and copy the code over.This sucks because all of the configuration you did in the GUI that was supposed to be helping you is basically lost. If you didn't take notes of every single change you made, you just are starting from scratch.For this reason it's ok to use an IDE for simple projects where you don't have to change much from the defaults. If you are doing extensive project customization i an IDE you should rethink it and move to manually managing your build system.

author: Perkele
author_rank: Regular Contributor
timestamp: February 28, 2024, 03:27:24 pm
content: If this is "Atmel Studio", have you tried to remove .atsuo files from .vs subfolder after copying a project?Those files are updated on each compile/build, they contain some hardcoded paths, debug info, etc.P.S. Do a backup before trying to remove files.

author: ajb
author_rank: Super Contributor
timestamp: February 28, 2024, 08:11:47 pm
content: Deleting the `.atsuo` files as Perkele mentions is a good first step in solving any kind of weirdness with Microchip/Atmel Studio. IME doing that has never caused a problem. You can also safely add them to .gitignore.There may be a setting somewhere to control absolute vs relative paths, but I've definitely duplicated atmel studio projects before and not seen this, so just deleting the .atsuo/other transient files might be enough.Quote from: ejeffrey on February 28, 2024, 02:49:11 pmAt least in Microchip/Atmel Studio (and Visual Studio, which the former is based on), all of that configuration is in plaintext in the project files. It might take a bit of work to extract it and port to a new build system, but it's not especially difficult to skim through and find most of the things that you would need to transfer. And if you're starting with a working IDE project, you can probably grab the automatically-generated makefile out of the build directory as a starting point. There are definitely some advantages to a non-IDE build system, but there's also a very large grey area as far as when it becomes the truly 'better' choice, depending on the project and the people working on it.

author: Simon
author_rank: Unknown
timestamp: February 29, 2024, 09:53:20 am
content: I just don't get it. All it has to do is follow the rules of the language. Did I include that file via the IDE or #include? no! , then why is it looking at it. It should rewrite all paths it has "collected" when I do a rebuild.So what file do I open when I open a project, the atsuo or the cproj ?

author: Simon
author_rank: Unknown
timestamp: February 29, 2024, 11:10:30 am
content: So I had to change the folder name. Nuts, is this microchip/atmel or microsoft that have stuffed up? if I get visual studio straight from microsoft would it do the same?I would love to use MPLABX but until microchip and netbeans work out how to use a 4k monitor I cannot use it as the!upscaled rendition on a 4k screen is worse than using a straight FHD screen. it's nuts.

author: peter-h
author_rank: Super Contributor
timestamp: March 01, 2024, 10:24:44 pm
content: Crosslinked files is an absolute bastard of a gotcha with ST Cube IDE.That is why I decided to not build multiple projects in it but instead build both a boot loader and the application code as one project. Lots of super-intelligent people here told me I was an idiot, etc, but it is much cleaner in the end.Otherwise, one could have run multiple IDE instances in VMs, to ensure total separation.

author: jc101
author_rank: Frequent Contributor
timestamp: March 01, 2024, 10:39:43 pm
content: Quote from: Simon on February 29, 2024, 11:10:30 amI use MPLAB X on a 4k monitor, but I have to modify the mplab_ide.conf file to make it usable. This is in the MPLAB install directory\mplab_platform\etc\Edit the "default_options=" line to add...Code:-J-Dsun.java2d.dpiaware=true..as the first parameter. Restart MPLAB and it's perfectly fine on a 4K monitor for me. That is the only change I make whenever I install a new version.edit to add I remember posting this before...https://www.eevblog.com/forum/microcontrollers/alternative-(better!)-ide-to-mplab-x/msg3625046/#msg3625046

author: Perkele
author_rank: Regular Contributor
timestamp: March 02, 2024, 12:43:52 am
content: Quote from: Simon on February 29, 2024, 11:10:30 amHere's a bit about .suo files:https://learn.microsoft.com/e1n-us/visualstudio/extensibility/internals/solution-user-options-dot-suo-file?view=vs-2022Atmel added their stuff into the file structure and renamed it to .atsuo..sln and .cproj files in project's root folder are XML-based, the structure is almost sane for the last decade or so.In "plain" VisualStudio there shouldn't be any hardcoded paths in them. If you open .cproj file in your project with a text editor, you'll see that there is a hardcoded path to device packages installed by Atmel.m

author: Bud
author_rank: Super Contributor
timestamp: March 02, 2024, 12:56:09 am
content: Dont you have "Save Project As..." in the File menu of the IDE?In Altium I have to "Save File As..." every file in the project to the new folder, not just the project file.

author: Simon
author_rank: Unknown
timestamp: March 02, 2024, 08:56:41 am
content: Quote from: peter-h on March 01, 2024, 10:24:44 pmThis is not about multiple projects together, like a solution full of projects or whichever way around it is. This is literally once you open a file with it and then close the project and open a completely different folder that happens to have a file with the same name it uses the one that has nothing to do with your project. Looking in the two project files I see no paths so this is the softwrae doing it.

author: Simon
author_rank: Unknown
timestamp: March 02, 2024, 08:59:23 am
content: Quote from: jc101 on March 01, 2024, 10:39:43 pmYea, did not work last time I tried on a work computer. I don't know if it is down to how the IT company have tied down our machines or what but it's a pain in the backside when you have to work around artificial problems but then IT is largely an artificial problem perpetuated by the IT company in order to create a self sustaining business fixing problems they caused in the first place.I'll try it on my home computer.

author: Simon
author_rank: Unknown
timestamp: March 02, 2024, 11:32:38 am
content: So I am back to the same old, I can have small well defined program elements with some random content the correct size and I would have to pick large font size because the program is actually totally unaware of the screen settings, the setting just stops the program upscaling itself badly.The other option is to get windows to scale it which does a good job on icons but leaves all text elements small and will ruin the file editing window with a lousy attemp at upscaling.So again, you can't win. if you can read tiny text it sort of works. but I absolutely would not say that MPLABX is 4k screen ready, it's the usual old programmer thing of any result is a result what's your problem.

author: tooki
author_rank: Super Contributor
timestamp: March 08, 2024, 02:58:01 pm
content: Quote from: Simon on March 02, 2024, 11:32:38 amThat, with some font sizes tweaked, is how I used it at my old job.MPLABX has no trouble copying projects. At least, I had zero trouble doing so, regardless of whether I did it externally in Windows Explorer, or via MPLABX’s own copy command.