Author Topic: Convert Keil uVision Workspace  (Read 18441 times)

Gary

  • Community Member
  • Posts: 43
  • Hero Points: 5
Convert Keil uVision Workspace
« on: November 27, 2007, 10:44:03 am »
I have made a new approach to open Keil uVision project files which does not require to hack the system macros shipped with SlickEdit which is not recommended according to the SlickCMacroBestPractices.pdf document saying "Modifying macros that ship with SlickEdit - Don't do it! Take your hands away from the keyboard..."  ;D

This version is an adaption of the cwprojconv.e macro shipped with SlickEdit 12.0.0.0.

The macro allows to import the folder and files used in a .uv2 file. It does so by parsing the original file and using SlickEdit's API to create the folders and adding the respective source files. Import of tools etc. is not supported yet.   

My recommendation is to add the function to the [Project] menu. You can do so by selecting '_mdi_menu' from the [Macro][Menus...]. Add the function 'OpenUvisionProject' to the menu [Project][Open Other Workspace].


This thread shall be used for new versions of this macro only. Please post questions, bugs, feature requests, etc. here:  http://community.slickedit.com/index.php?topic=2407
« Last Edit: December 05, 2007, 12:33:20 am by Gary »

Gary

  • Community Member
  • Posts: 43
  • Hero Points: 5
Re: Convert Keil uVision Workspace
« Reply #1 on: December 09, 2007, 08:21:53 am »
Attached you find an updated version with the changes requested by roguebear. Also a thank you to HS2 for the input on executing shell commands from SlickEdit and outputting to the build window.

File Version: 0.9.1
File Changes:
 
  • A project properties section is now created in the .prj file - this enables the functionality of the [Project Properties] window.
  • A Slick-C function KeilTranslate has been introduced to perform the translate (compile/assemble) task (this does not support any compile options at the moment

« Last Edit: December 09, 2007, 08:31:22 am by Gary »

LM54

  • Community Member
  • Posts: 8
  • Hero Points: 1
Re: Convert Keil uVision Workspace
« Reply #2 on: September 03, 2008, 03:39:37 pm »
Our company only has licences for V10.0, will this macro work with this version?

LM54

  • Community Member
  • Posts: 8
  • Hero Points: 1
Re: Convert Keil uVision Workspace
« Reply #3 on: September 03, 2008, 04:07:44 pm »
Never mind, it does work ;D

roguebear

  • Community Member
  • Posts: 17
  • Hero Points: 0
Re: Convert Keil uVision Workspace
« Reply #4 on: August 14, 2010, 02:54:45 am »
the keil has new verison uv4.  can sb modify the .e to confit uv2, uv3, uv4 ?

Gary

  • Community Member
  • Posts: 43
  • Hero Points: 5
Re: Convert Keil uVision Workspace
« Reply #5 on: August 14, 2010, 06:36:08 pm »
the keil has new verison uv4.  can sb modify the .e to confit uv2, uv3, uv4 ?

Hi all, I am out of the embedded business so i do not intend to maintain this macro anymore.
uv4 uses an XML project file now - it should not be too complicated to write a new converter - volunteers are welcome ;) roguebear?  ;D ;D ;D

hs2

  • Senior Community Member
  • Posts: 2727
  • Hero Points: 281
Re: Convert Keil uVision Workspace
« Reply #6 on: August 15, 2010, 12:03:47 pm »
Luckily SE uses XML (project) files as well. So hopefully the required parsing funtions (e.g. _xmlcfg_*) are already there.
Just a hint.
Good luck, HS2

roguebear

  • Community Member
  • Posts: 17
  • Hero Points: 0
Re: Convert Keil uVision Workspace
« Reply #7 on: November 07, 2011, 01:11:20 am »
_xmlcfg_.. function cann't get the content between <tag>...</tag>.  so I can't convert keil or iar project to slickedit...  anyone can help?

chrisant

  • Senior Community Member
  • Posts: 1413
  • Hero Points: 131
Re: Convert Keil uVision Workspace
« Reply #8 on: November 07, 2011, 06:55:46 am »
I thought that's what _xmlcfg_get_value_ does?

roguebear

  • Community Member
  • Posts: 17
  • Hero Points: 0
Re: Convert Keil uVision Workspace
« Reply #9 on: November 07, 2011, 08:27:44 am »
get_value only can get the attribute value. such as.
<name attribute = "12345">,  but can't get the value of <name>12345</name>

chrisant

  • Senior Community Member
  • Posts: 1413
  • Hero Points: 131
Re: Convert Keil uVision Workspace
« Reply #10 on: November 07, 2011, 09:05:08 am »
You're right, _xmlcfg_get_value_ can't get that.
But for completeness here's what _xmlcfg_get_value_ gets, which isn't an attribute; there's a separate function for getting attribute values.

Code: [Select]
<Field name="Comment">
        <Value>
                <![CDATA[It can extract this, right here.]]>
        </Value>
</Field>

roguebear

  • Community Member
  • Posts: 17
  • Hero Points: 0
Re: Convert Keil uVision Workspace
« Reply #11 on: November 08, 2011, 12:15:37 am »
_xmlcfg_get_value_ gets  ???

I can't find this function.  I use slickedit 16.0.0.3. the newest version.

I am crazy for this problem many weeks!!

chrisant

  • Senior Community Member
  • Posts: 1413
  • Hero Points: 131
Re: Convert Keil uVision Workspace
« Reply #12 on: November 08, 2011, 05:11:13 am »
The XMLCFG APIs are for parsing certain kinds of specially formed XML intended for use by SlickEdit for storing configuration settings.

I don't think XMLCFG is designed to be capable of what you're looking for.

roguebear

  • Community Member
  • Posts: 17
  • Hero Points: 0
Re: Convert Keil uVision Workspace
« Reply #13 on: November 08, 2011, 11:48:22 am »
Have any suggestion about how to get the "12345" between <node>12345</node>??

chrisant

  • Senior Community Member
  • Posts: 1413
  • Hero Points: 131
Re: Convert Keil uVision Workspace
« Reply #14 on: November 08, 2011, 05:22:37 pm »
I don't know the bigger picture about what needs to be done.  If it's converting a Keil uVision workspace to a SlickEdit workspace, then I'd just write an external program and invoke that.

Slick-C is portable, but it's a macro language, and there are limits to its sophistication.