Comments (5)
@fred-r as a temporary workaround could you please set the CMSIS_PACK_ROOT variable:
export CMSIS_PACK_ROOT=c:\\CMSIS_PACKS
from cpackget.
Works indeed, thanks !
frq09468@LMECWL0888 MINGW64 /c/Packs
$ export CMSIS_PACK_ROOT=c:\\CMSIS_PACKS
frq09468@LMECWL0888 MINGW64 /c/Packs
$ cpackget pack list
I: Using pack root: "c:\CMSIS_PACKS"
I: Listing installed packs
I: ARM.CMSIS-Driver.2.6.1
I: ARM.CMSIS.5.7.0
I: ARM.CMSIS.5.8.0
I: ARM.mbedTLS.1.7.0
I: ARM.PSA.1.0.0
I: Keil.ARM_Compiler.1.6.3
I: Keil.MDK-Middleware.7.12.0
I: Keil.MDK-Middleware.7.13.0
I: Keil.NUCLEO-L552ZE-Q_BSP.1.2.0
I: Keil.STM32F4xx_DFP.2.15.0
I: Keil.STM32H7xx_DFP.2.8.0
I: Keil.STM32L4xx_DFP.2.6.1
I: Keil.STM32L552E-EV_BSP.1.1.0
I: Keil.STM32L562E-DK_BSP.1.3.0
I: Keil.STM32L5xx_DFP.1.4.0
I: Keil.STM32L5xx_TFM-PF.1.1.0
I: Keil.STM32NUCLEO_BSP.1.8.0
I: Keil.STM32U5xx_DFP.1.1.0
I: STMicroelectronics.board_resources_B-U585I-IOT02A.0.0.1
I: STMicroelectronics.Example_HAL_GPIO_Toggle.0.0.1-alpha1
I: STMicroelectronics.STM32U5xx_DFP.0.1.0-alpha1
I: STMicroelectronics.STM32U5xx_Drivers.0.0.1-alpha1
I: STMicroelectronics.STM32U5xx_Drivers.0.1.0-alpha1
from cpackget.
@fred-r, Thanks for opening the issue!
Which terminal/bash are you using?
from cpackget.
Hi Charles,
I use MinGW64 (installed with git bash).
Thanks & Regards,
Fred
from cpackget.
By default, CMSIS_PACK_ROOT
environment variable is defined in a Windows environment as C:\SOME_PATH
. Both bash and cmd work fine with that approach.
In git-bash/mingw, if the user tries to export CMSIS_PACK_ROOT=C:\SOME_PATH
or --pack-root/-R C:\SOME_PATH
, bash automatically removes the backwards slash \
because it is considered to be a escape character, so it becomes C:SOME_PATH
, which is a valid directory name. It's wrong, but valid.
I wrongly assumed that this would throw an error when cpackget tried to check if it existed. The colon :
character is not allowed in directory names on Windows. But in reality, that does not fail in neither bash nor cmd:
- in bash, this becomes a valid name
C:SOME_PATH
which Windows later translates it to the unicode character 61498 which is valid. - in cmd, this becomes
SOME_PATH
(C:
is removed) only, which is still valid.
To fix that, users should either escape all backwards slashes C:\\SOME_PATH\\SUB_DIR
or wrap it around single/double quotes cpackget -R "C:\SOME_PATH"
.
Another finding is that bash paths formatted as /c/SOME_PATH
are always translated to C:/SOME_PATH
with the forward slash before passing it to cpackget. And this is where things get confusing, because when cpackget lists installed packs, and they all start with C:\SOME_PATH
. This means that cpackget will never receive paths in /c/SOME_PATH
format. It seems this is just a visualization feature of bash.
By using the correct approach to set the path, cpackget works just fine.
So I created this patch to fix cases where paths like C:/SOME_PATH
are sent to cpackget. The following paths are now cleared before being used by cpackget:
C:/SOME-PATH
becomesC:\SOME_PATH
C:////SOME_PATH
becomesC:\SOME_PATH
C:\\\\SOME_PATH
becomesC:\SOME_PATH
C:/SOME_PATH\SUBDIR
becomesC:\SOME_PATH\SUBDIR
, and so on
from cpackget.
Related Issues (20)
- [cpackget] Test fails in verbose(-v) mode
- [blocker] cpackget `crashes` when a local pack uses `<url>file:///</url>` to reference to a pack/pdsc HOT 2
- [critical] `cpackget update-index` shall check for updates for local packs `$CMSIS_PACK_ROOT/.Local`
- [cpackget] extract license file fails if the location is in a subdirectory of the pack
- [cpackget] missing command to `list` and `update` installed packs after updating the index.pidx (updated) HOT 10
- Proper handling of "file:///" for Windows/Linux/Mac
- [cpackget] exclude pdsc files from deprecated packs to be downloaded and present in the `.Web` folder HOT 1
- Add option `--deprecated` to omit deprecated packs by default HOT 1
- [cpackget] Confusing unaligned output `cpackget update-index -a` due to concurrent downloads
- Pack name length limit? HOT 2
- [cpackget] must strip meta data from version HOT 4
- cpackget rm does not work for local packs HOT 2
- No support for relative pack versions (supported by cprojects) and no error output when attempting to use relative pack versions HOT 2
- [cpackget] cpackcpackget deletes pack file content when installing from `$CMSIS_PACK_ROOT/.Download/` HOT 1
- Error when trying to install NXP::[email protected] with cpackget 2.1.1 HOT 1
- [cpackget] fails to install the packs specified in the `requirements` section (regression from 2.0.1) HOT 2
- cpackget: path problem when installing local packs HOT 1
- [cpackget] add a command that installs a minimum version of a pack HOT 1
- [cpackget] Failed to decompress a file HOT 1
- Simplify usage of `cpackget` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpackget.