Problem with editing registers on register window

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ever since the version 4.15, I noticed a problem with the register window. I change the name of a register, for example I edit the label of R16 and I type A, I save my project but when I open the same project again, all the changes I made are gone.
In the beta version of 4.16, it's not even possible to edit the labels of the registers by double clicking on any register.
That's a very important feature for me because in my programs I always use my own names for the registers and it's really frustrating editing the names again and again every time I open a project.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had never tried editing the register names in the register window.

I have Studio 4.13. I can confirm that you can use the .def register names in the Watch window and edit an ".undef" register name in the Register window.

These names are retained when the project is re-opened.

I can only suggest that you edit your project.aps file to use your names.

A short sed script may do it.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It worked even in version 4.14
It doesn't work in 4.15 and in the new beta 4.16

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do the names work in Watch windows ?

I tend to avoid jumping to new software versions until the whingeing has calmed down.

You are better off with a few bugs that are already known.

Once you have a debug session set up, you can just close the project without saving. So it is worth trying to edit the .APS file. You will only need to re-edit if you let Studio save the project.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Do the names work in Watch windows ?
This has nothing to do with the watch windows, it's the register view. (see below)

Yes I can confirm the HORRIBLE bug with Studio 4.15. All my register names in older projects are GONE! :shock:

I can however edit the names during a debug session and even after closing and reopening the debug session the names stay. However they go for good, it seems, once the project is closed.

stonesober have you put it a ticket into Atmel? Also anyone with Studio 4.16 can you see if the problem has been fixed there? (edit I see that it has not been fixed)

Register view with names: (this is a screen shot of another problem in Studio 4.13- see how some registers have been renamed)

Attachment(s): 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I can however edit the names during a debug session and even after closing and reopening the debug session the names stay. However they go for good, it seems, once the project is closed.

So Studio still uses the edited names. It obviously either does not write the names back in the .APS file or does not parse them when it reads the .APS when the project is opened.

I have no intention of installing a duff Studio. So please could you either email me a 4.16 .APS file or "egrep" the .APS file for your unique register names.

Alternatively you can compile this on your PC to make the .APS more human readable. Edit the output and write back as the .APS file.

David.

#include 
#include 
#include 

#define MAXTAG 500

int indentxml(char *name)
{
	FILE *fp;
	char starttag[MAXTAG], endtag[MAXTAG], bigtag[MAXTAG], *p;
	int c, is_start, indent = 0, i, maxtag = 0;

	if ((fp = fopen(name, "r")) == NULL) {
		perror(name);
		return 1;
	}
	while ((c = fgetc(fp)) != EOF) {
		if (c == '<') {
			c = fgetc(fp);
			is_start = (c != '/');
			if (is_start) {
				p = starttag;
				*p++ = c;
				indent++;
			}
			else p = endtag;
			for (i = 1; ++i < MAXTAG && (c = fgetc(fp)) != '>'; ) *p++ = c;
			if (p[-1] == '/') indent--;		// SINGLE tag
			*p = '\0';
			if (i > maxtag) {
				maxtag = i;
				strcpy(bigtag, is_start ? starttag : endtag);
			}
			if (strcmp(starttag, endtag) != 0 || is_start) {
				putchar('\n');
				for (i = 1; i < indent; i++) printf("  ");
			}
			if (!is_start) {
				indent--;
				printf("", endtag);
			}
			else printf("<%s>", starttag); 
		}
		else putchar(c);
	}
	fclose(fp);
	fprintf(stderr, "%s: BIGGEST TAG [%d]: \"%s\"\n", name, maxtag, bigtag);
	return 0;
}

void main(int argc, char **argv)
{
	int ret = 0;
	if (argc < 2) {
		fprintf(stderr, "Usage: %s file.aps ...\n", argv[0]);
		fprintf(stderr, "\tindents XML file(s) to stdout\n");
		exit(1);
	}
	while (--argc)
		ret |= indentxml(*++argv);
	exit(ret);
}

Edit. Forget about egrep or indenting the .APS file. Just open the .APS with NotePad. Use ctrl-F to search, and edit register names appropriately.
If the names are already there, the "Open Project" has the bug.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have posted an official bug report on this just in case no one has done it.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

John,

Does v1.6 .APS file contain your register names ?
which implies the file parsing is wrong.

Or does it not write the register names? And reading in a .APS file with names works ok.

The latter case is easily solved, as I suggested earlier. The former can only be fixed by Atmel.

David.

Edit. If anyone is interested:

The edited register names are written quite correctly to the project.APS file.

When the project is opened, Studio does not parse the Register names and consequently they only appear as R00 .. R31

A subsequent Save Project will write R00 .. R31

A possible workaround is to enter all your register names as global Watch variables. These are written and read correctly.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I'll go back to 4.14 for now and wait for a fix from Atmel. :?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Latest UPDATE...there isn't one. :( haven't even received the automated ticket response to the bug report.

C'mon boys and gals at Atmel, is this ome form of anti ASM user thing? :wink:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So was the solution to eliminate the ability to change them at all? I'm double-clicking and nothing is happening on 4.16/638.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'm double-clicking and nothing is happening on 4.16/638.
Since 4.15 it has gotten WORSE with each new version, SP1 for Studio 4.16 breaks things completely. :(

No fixes untill Studio 4.17 I have been told. :evil:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
No fixes untill Studio 4.17 I have been told.
Thanks, John. That's not GOOD news, but at least they haven't abandoned it entirely.