iarsystems / ewptool Goto Github PK
View Code? Open in Web Editor NEWProductivity tool for populating an IAR Embedded Workbench project
License: The Unlicense
Productivity tool for populating an IAR Embedded Workbench project
License: The Unlicense
*.S
(upper-case "s") files.yyyy-MM-dd'T'HH:mm:ss.SSSZ
Thx
We have a project where the EW project files (e.g. *.eww, *.ewp, *.ewt, etc) are in a subfolder; so if the main project folder is my_project, then these files are in my_project/EWARM.
When EWPTool is run on the project, I can see in the log that it is correctly scanning all the files - but then it stops and exits at the end of the Assembler Header part.
If you move the project files out of the subfolder, the tool works fine! So there is a workaround.
(PS: Thank you for creating this tool. It is incredibly useful, as I find it much easier for the workspace structure in EW to match the actual locations of the files. For one thing, it makes finding files much easier. Using the tool to generate the list of include directories also saves a lot of time.
Are there any plans to incorporate the tool's functionality into EW? I'd also welcome features from Eclipse, like being able to search for files by name, having the workspace explorer automatically open to the currently open file, and having a button to close all open folders in the workspace explorer.)
When EWPtool is invoked for the first time with the project's settings
folder missing, the log file is not created.
settings
folder (e.g. version controlled), create the settings
folder before invoking EWPtool for the first time.Removal of stale files and file groups sometimes fails.
Example 1:
group1\group2\source1.c
group1, group2 and source1.c removed from disk but group1 remains in .ewp after rescan.
Example 2:
remove group1\source1.c on disk
add group2\source1.c o disk
after rescan the group1\source1.c is still on the .ewp
The IDE can take groups named ..
. However group named like this will propagate to $CONFIG_NAME$/BrowseInfo
's parent directories. When a single parent level is involved, the generated browser data stills inside $CONFIG_NAME$
. Above that using the output defaults, (i.e. ..\..
) it will build inside the $PROJ_DIR$
.
After project is populated, rename/move/remove affected groups while avoiding ..
, ..\..
, etc. in their names.
While it is true that the README provides instructions for selecting folders to be monitored only from the same drive in which the project file sits, the "Browse for Folder" dialog allows selecting a source folder from another drive.
After updating to v4.1.8 EWP-Tool makes weird changes to the include-path sections of my .ewp
.
It deletes lots of lines. Initially it looked like it did not recognize folders below the level you select in the interface, but on closer inspection that was not the case.
I had a hard time reproducing it in a minimal example, but in the end I succeeded. I can't tell you the exact failure mode, but it has something to do with folder name lengths and/or path depth and the order they are listed in the .cfg
file.
See my example here: https://github.com/NotKasperNielsen/STM32-G4-EWPtool-Example
Branch: v4.1.8_Missing_Subfolders
Successively rescanning monitored folders in a project with an excluded group will result in repeated entries. Example from when rescanning a project twice:
<group>
<name>demoFolder</name>
<group>
<name>demoSubFolder</name>
<excluded>
<configuration>Debug</configuration>
</excluded>
<group>
<name>demoSubSubFolder</name>
<file>
<name>$PROJ_DIR$\demoFolder\demoSubFolder\demoSubSubFolder\subSubFolderFile.c</name>
</file>
</group>
<file>
<name>$PROJ_DIR$\demoFolder\demoSubFolder\subFolderFile.c</name>
</file>
+ <file>
+ <name>$PROJ_DIR$\demoFolder\demoSubFolder\subFolderFile.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\demoFolder\demoSubFolder\subFolderFile.c</name>
+ </file>
</group>
<file>
<name>$PROJ_DIR$\demoFolder\otherFile.c</name>
</file>
<file>
<name>$PROJ_DIR$\demoFolder\otherFile2.c</name>
</file>
</group>
Minimal. It does not affect file(s) which were excluded from build.
Save the populated *.ewp
via IDE to deduplicate entries.
This issue will be fixed in the next version.
I would like the tool to reload automatically (or manually with a reload button) all sources files and preprocessor includes, when there is a change on the drive.
Automatic reload should occur when:
It would also be helpful to remove (replace) old preprocessor includes
The log file generated in v4.2.1 shows which files were detected during the file system scanning phase but not list the actual modifications performed in the project file.
To be resolved in the next version.
When EWPtool is used directly from the command line in a project directory that has no settings
folder it will not create:
<project-directory>/settings/<project-name>.cfg
nor<project-directory>/settings/<project-name>.log
.<project-directory>/settings/
.Description
As per version EWPtool v4.1.6, there is a corner case where when multiple selected paths are set and 2+ of them spans to the same location, The tool will recursively scan the same subdirectories multiple times due the multiple entries, leading to lowered performance and potential mismatch for electing removable entries.
Example
The following entries:
<project-path>\test-15.dir\Demo-App2\app\.
<project-path>\test-15.dir\Demo-App2\app\..
<project-path>\test-15.dir\Demo-App2\app\..\..
<project-path>\test-15.dir\Demo-App2\app\platform-app
Can be reduced to the top level:
<project-path>\test-15.dir\
Workaround
For now, it is advised to avoid path entries that spans to a same location more than once in the .cfg
file under the <selectedPath>
key.
Resolution
To be fixed in the next version by deduplicating lexically normal paths, updating outputs accordingly.
When I add a new folder to my repo and want to add it to my IAR EW project, I go to "Tools -> Select source folder ...".
This correctly finds the folder, adds it to the .cfg file and to the project.
The problem is that now my .ewp file has now been completely reformatted, with git detecting of thousands of changes. The file is still valid XML, but I have no chance of knowing what happened or backtracking in my history.
To restore order to chaos, I have to make a new change to the project options and save again in IAR EW. Usually I just exclude a file and then include it again. Now the file is back in the "correct" format, and I can see the few lines that actually changed.
The same thing happens when I use "Tools -> Rescan Selected Source Folder...", even though nothing has actually changed.
I have an example of this here:
https://github.com/NotKasperNielsen/STM32-G4-EWPtool-Example/tree/EWP_file_reformatting_example
I would like to use EWPtool to move a folder on Explorer to another Explorer or workspace.
The following questions are asked in that regard.
After moving (adding) a folder with EWPtool, the folder was not added to the workspace.
In Explorer, the folder was added, but not at the location I wanted.
→How do I add the added folder to the workspace?
How do I specify the location of the added folder?
When I rebuild a folder that was added to the workspace, I get an error message that the path is not followed.
How do I specify the path for each folder?
Is there a way to let the tool add also header files to the project?
Thanks
FC
S124
to S128
and regenerate the project.synergy
folder).EWPtool erases stale folders for monitored header folders.
However, it does not clean up stale folders for non-monitored header folders, independently if they are being currently monitored or not.
When use "Select source folder..." and add a folder, the tool adds a line to the .cfg file like this:
<selectedPath>C:\Sandbox\Demo-App\platform\common\bsp\devices\MY9221</selectedPath>
It's an absolute path, which is problematic, because I want to share the project setup across my team.
I would like it to write a relative path like this instead:
<selectedPath>$PROJ_DIR$\..\platform\common\bsp\devices\MY9221</selectedPath>
I tried just writing this directly to the .cfg file, but then rescan doesn't add my new files or throw an error.
Am I doing something wrong?
Thanks
I found a couple of issues with the EWP tool in which I need some help.
I noticed that the it does not detect *.asm and *.s51 assembly source files. Even if I have to migrate the Assembly source code on these files, I would like to have my project populated with them, since dozens of files are involved.
I noticed that the tool also populates the project with *.a libraries. This is counterproductive as pre-compiled libraries aren't really source code. I understand that adding a library as a node in the source tree will work when building the project. But I rather prefer to have the libraries set manually. There were several cases in which I had to remove many libraries which were unsuitable for the Release configuration and vice-versa.
I am using EW8051 version 10.40.1, which has the "Project Connection" feature available.
Thx.
Hi,
Actually, I can see V5.x is available to convert.
But, I am using V4.53.0.6.
So, I would like to know V4.x is possible to convert for now.
Thanks in advance,
BRs.
Tommy JY Lee
Hi Team
After replacing the PC and reinstalling EWARM, I installed EWPTool, but the message "The specified file could not be found" pops up and EWPTool cannot be started.
I tried installing EWARM several times, but nothing changed.
This occurred with EWPTool 4.2.4, and I tried using 4.2.6 afterwards, but it didn't improve.
Windows 11
EWARM 8.42.1 and 8.50.10
Thanks,
A user provided a well-written feature request:
I'm currently using a library which has files like this:
Folder_1/My_file.c Folder_1/My_file.h Folder_2/My_file.c Folder_2/My_file.h
I only want to use one of these folders in the current project but would prefer not to delete the unused folder from disk, in order to have it ready for future use.
For*.c
it is easy as I can tell the IDE to Exclude from build and EWPtool is unaffected.However, for removing the header files (
*.h
) path from the preprocessor, I need to remove the relevant line from the list. Once I re-scan the monitored folder, EWPtool will put it back.I could just delete the unused folder and, for now, that's what I'm doing. Would be possible to add a feature to EWPtool where it could be told to permanently block certain folders from being traversed? Would that be useful for anyone apart from us?
As per EWPtool 4.2.3, it is possible to:
settings/<project>.cfg
).This was valuable feedback which shows how the utility is used in different ways. Even if there is known workarounds for a few exceptions, using EWPtool on a huge source tree containing too many exceptions will slow down the developer, beating the whole purpose. For such reason, this feature request was accepted, and it is now scheduled for EWPtool 4.2.4. In the new version, the user will have the option to create an empty file named .ewptoolignore
in any monitored folder. Whenever EWPtool traverses through the monitored folder tree, it will solely ignore any folder containing a file named .ewptoolignore
.
There is an advanced use case in which a post-build action comes with a couple of cascaded scripts executed in succession, in case the first one is successfully executed (a && b
, or "execute b
if a
was successful"). Here is an example:
$PROJ_DIR$/script1.bat && $PROJ_DIR$/script2.bat
The ampersand (&
) is a special character in the XML specification. The IDE escapes it so that the <postbuild>
tag becomes:
<postbuild>$PROJ_DIR$/script1.bat && $PROJ_DIR$/script2.bat</postbuild>
When EWPtool
post-process the project file containing such entry, the tag becomes:
<postbuild>$PROJ_DIR$/script1.bat &amp;&amp; $PROJ_DIR$/script2.bat</postbuild>
If EWPtool
processes the project once more:
<postbuild>$PROJ_DIR$/script1.bat &amp;amp;&amp;amp; $PROJ_DIR$/script2.bat</postbuild>
...and so on. These entries in excess make the project fail to build.
No automated workaround known to the date. Manual XML intervention required.
EWPtool
was initially designed with the sole purpose of populating an empty project and such advanced use case was not predicted from the start, as it involves exceptional handling for XML special characters. Hence, this special use case will be addressed in the next version.
There are some cases where recent versions of the IDE might be using self-closing XML tags in some fields. EWPtool doesn't use this. Examples:
<settings>
<name>Coder</name>
<archiveVersion>0</archiveVersion>
- <data />
+ <data></data>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>2</archiveVersion>
- <data />
+ <data></data>
</settings>
Impact: minor.
Workaround: save the EWP via IDE before checking-in the file to version control.
Hi,
Firstly, thank you for building this tool! Is has been a major help to our workflow when creating new project using a large shared code-base.
I have an issue since updating to the latest version. (I do not recall which version came before, but is used .ipcf
files)
I started a clean EWARM project to test building a project with the latest version. Now when I try to add files using the EWPtool, files with an underscore in the filename (e.g. test_file.c
) are not detected.
The weird part is that it does not seem to be consistent across all folders.
The project is a simple C application for a STM32 evaluation board with driver generated using STM32 CubeMX.
I have not had any issues like this before updating.
Is this a new issue with the tool, or am I using it wrong?
// Thanks
Description
As per version EWPtool v4.1.6, the modified EWP file special characters and empty XML elements are modified.
Example
Consider the following entry:
<!-- original .ewp -->
<state></state>[CR][LF]
<!-- modified by ewptool -->
→→<state />[LF]
Severity
Low.
Workaround
Restoring the original file from version control (/backup).
Resolution
To be fixed in the next version by parsing while preserving the aforementioned characters and avoiding self-closing elements.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.