GithubHelp home page GithubHelp logo

iarsystems / ewptool Goto Github PK

View Code? Open in Web Editor NEW
60.0 60.0 14.0 1.99 MB

Productivity tool for populating an IAR Embedded Workbench project

License: The Unlicense

arm avr configuration cortex cortex-a cortex-m embedded ewp ewptool import infineon nxp productivity project renesas risc-v siliconlabs stm32 stm8 workbench

ewptool's People

Contributors

felipe-iar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ewptool's Issues

ISO 8601 for logging

Description

  • The log for EWPtool 4.2.0 does not follow the ISO 8601 specification.
yyyy-MM-dd'T'HH:mm:ss.SSSZ

Resolution

  • To be fixed.

EWPTool does nothing if project files are in a subfolder

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.)

Missing log on the first launch if there is no previous settings folder, if invoked from the command line

Description

When EWPtool is invoked for the first time with the project's settings folder missing, the log file is not created.

Impact

  • Minor

Workaround

  • When operating EWPtool from the command line for a project which has no settings folder (e.g. version controlled), create the settings folder before invoking EWPtool for the first time.

Resolution

  • To be fixed in the next version. A settings folder will be automatically created when needed.

Removal of stale files and file groups

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

v4.2.4 currupts .ewp after "rescan"

When running "Rescan selected source folders(s)" EWARM is unable to re-load the project .ewp
image

When looking at the git diff you can see that the opening tag for <buildActions> and <buildAction> are deleted.
Also, it still adds extra &amp; in the <cmdline> lines.
image

Handling of groups named after upper levels (..)

Issue

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$.

Workaround

After project is populated, rename/move/remove affected groups while avoiding .., ..\.., etc. in their names.

Remediation

  • This will be fixed in a future version.
  • Affects documentation.

"Browse for Folder" dialog allows selecting a source folder from another drive

Description

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.

Impact

  • Minor

Workaround

  • Avoid selecting a source folder from a drive in which the project files do not belong to.

Resolution

  • To be fixed in the next version. EWPtool will narrow down the selectable options to the project file's current drive.

Fails to recognize some paths and corrupts include-path.

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

Rescanning monitored folders successively might render repeated <file> tags

Description

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>

Severity

Minimal. It does not affect file(s) which were excluded from build.

Workaround

Save the populated *.ewp via IDE to deduplicate entries.

Resolution

This issue will be fixed in the next version.

Add automatic reload feature or add a reload button

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:

  • Changing directory name
  • Changing file name
  • Adding a file
  • Removing a file

It would also be helpful to remove (replace) old preprocessor includes

Installing multiple instances of the EWPtool

Issue description

  • The self-extracting EWPtool Installer creates a single entry on the Installed Programs in Windows.
  • Installing the EWP a second time will fail.

Proposed solution

  • Release the EWPtool as a zip archive for a drop-in package replacement.

Command line operation improper without the settings folder

Description

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.

Impact

  • Blocker

Workaround

  • Create <project-directory>/settings/.

Resolution

  • To be fixed in the next version. EWPtool will create the settings folder if eventually it does not exist yet.

Multiple selected paths pointing to the same location

  • 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.

Reformats EWARM Project File when scanning files/folders

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.
image

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.
image

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

Moving folders using EWPtool

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?

EWSYN: some device files are not removed when deleted

Issue

  • An EWSYN project do not get properly updated when the target device is changed in the SSC.

How to reproduce

  • In the SSC, switch the device from S124 to S128 and regenerate the project.
  • Rescan the selected folder (containing the synergy folder).

image

  • Result: EWPtool fails to remove the files related to the old target (S128).

Absolute paths in .cfg file

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

Implement optional logging capabilities

  • For minimizing workload for users when reporting issues, implement logging capability for EWPtool.
    • Some suggested items:
      • Original EWP's entries
      • Steps in which EWPtool operates over EWP
      • Project's whole structure in the filesystem (folders/filesystem)

Issue with automatic source detection

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.

EWPTool does not start even after clicking “Select source folder”

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,

Add .ewptoolignore support

Feature request

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?

Workaround

As per EWPtool 4.2.3, it is possible to:

  • Move one of the folders outside the folders to be traversed, or
  • Add specific folders to be monitored in the EWPtool configuration (settings/<project>.cfg).

Resolution

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.

Ampersand post-processing in post-build action

Description

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 &amp;&amp; $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;&amp;amp; $PROJ_DIR$/script2.bat</postbuild>

If EWPtool processes the project once more:

<postbuild>$PROJ_DIR$/script1.bat &amp;amp;amp;&amp;amp;amp; $PROJ_DIR$/script2.bat</postbuild>

...and so on. These entries in excess make the project fail to build.

Workaround

No automated workaround known to the date. Manual XML intervention required.

Resolution

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.

IDE might be using self-closing XML tag

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.

Files with underscore '_' in the filename are not detected

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.

image

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

XML output special characters

  • 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.

Improve command line parameter parsing

Feature request

  • Provide a flexible command line parameter parser for improved CLI operation.

Description

  • Up to 4.1.9, the parameters are hardcoded like this:
    image

  • An additional 5th parameter force can be used to force the folder selection dialog box.

  • This change affects documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.