Jump to content

Recommended Posts

Pavel,

 

Can we have a list of fixes/updates for this release candidate? This will make it easier to check for any problems.

 

BTW, there still isn't any Release Notes for V7.11!

 

Thanks

 

davidb

Share this post


Link to post
Share on other sites

Hello,

 

The MplabX plugin does work now, that is great.

But.. it still points to the "old linker name". (ok, it's only the message, after the message and clicking OK, the linker does work.)

How can this be chanched, it would be nice that you can point MplabX to the right linker location for sourceboost, like you can set the locations of the xc8 compiler and linker.

Or that the .nmb file uses the right linker location.

 

Lieuwe

Share this post


Link to post
Share on other sites

But.. it still points to the "old linker name". (ok, it's only the message, after the message and clicking OK, the linker does work.)

How can this be chanched, it would be nice that you can point MplabX to the right linker location for sourceboost, like you can set the locations of the xc8 compiler and linker.

Or that the .nmb file uses the right linker location.

I think this comes from your previous NMB file. When I try the new NMB on a fresh MplabX installation on a computer that has never MplabX installed before it picks the correct linker.

 

A fix will be to either point MplabX to the 'correct' linker file or copy the 'correct' linker file to a file with the name that MplabX uses.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Hi Pavel,

 

Still having problems with this version with variables within a structure. See my previous bug report.

 

#define HOPPER_TIMEOUT  3000
static struct {
uint16   timeout;
} hop;

if (++hop.timeout == HOPPER_TIMEOUT)
1A9E  4A5C	   INFSNZ gbl_26_hop+D'3', F
1AA0  2A5D	   INCF gbl_26_hop+D'4', F
1AA2  0EB8	   MOVLW 0xB8
1AA4  625C	   CPFSEQ gbl_26_hop+D'3'
1AA6  D003	   BRA label216
1AA8  0E0B	   MOVLW 0x0B
1AAA  625D	   CPFSEQ gbl_26_hop+D'4'
1AAC  D000	   BRA label216
1AAE		    label216
{

}
if ((hop.timeout += 1) == HOPPER_TIMEOUT)
1AAE  4A5C	   INFSNZ gbl_26_hop+D'3', F
1AB0  2A5D	   INCF gbl_26_hop+D'4', F
1AB2  0EB8	   MOVLW 0xB8
1AB4  0101	   MOVLB 0x01
1AB6  635D	   CPFSEQ CompTempVar834, 1
1AB8  D003	   BRA label217
1ABA  0E0B	   MOVLW 0x0B
1ABC  635E	   CPFSEQ CompTempVar835, 1
1ABE  D000	   BRA label217
1AC0		    label217
{

}
if ((hop.timeout = hop.timeout + 1) == HOPPER_TIMEOUT)
1AC0  525C	   MOVF gbl_26_hop+D'3', F
1AC2  525D	   MOVF gbl_26_hop+D'4', F
1AC4  2A5C	   INCF gbl_26_hop+D'3', F
1AC6  B4D8	   BTFSC STATUS,Z
1AC8  2A5D	   INCF gbl_26_hop+D'4', F
1ACA  505C	   MOVF gbl_26_hop+D'3', W
1ACC  6F5F	   MOVWF CompTempVar836, 1
1ACE  505D	   MOVF gbl_26_hop+D'4', W
1AD0  6F60	   MOVWF CompTempVar837, 1
1AD2  0EB8	   MOVLW 0xB8
1AD4  635F	   CPFSEQ CompTempVar836, 1
1AD6  D016	   BRA label219
1AD8  0E0B	   MOVLW 0x0B
1ADA  6360	   CPFSEQ CompTempVar837, 1
1ADC  D013	   BRA label219
{

}

 

Here are three 'if' statements which are supposed to do the same thing, increment a variable and compare.

 

The first version, if (++hop.timeout.... produces good code.

 

The second version, if ((hop.timeout += 1)... compares with unassigned temp variables.

 

The third version, if ((hop.timeout = hop.timeout + 1)... has a couple of extra instructions at the beginning.

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

7.12 Released version doesn't fix my problem :(

 

Only one case "if ((hop.timeout += 1) == HOPPER_TIMEOUT)" was not fixed. All others should be fine. Please confirm which one is not working for you.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Hi Pavel,

 

I need the confidence that I can write any legitimate C statement and the correct result will be supplied.

 

Spending time debugging good code to find it was the compiler that got it wrong is time consuming.

Having to re-write my code to find a workaround that works is expensive and causes project delays.

 

For the readers:

The reason I put my module data into a structure reduces the amount of bank switching that takes place and therefore gives a performance boost.

The structure keeps my related data on the same RAM page. Without the structure the linker is free to scatter my data over any RAM page resulting in many bank switching instructions being used.

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

I need the confidence that I can write any legitimate C statement and the correct result will be supplied.

The reason compiler operates only on the low byte of a pointer in increment/decrement operations is based on the optimiser knowledge about the compiler limitation that an object (increment/decrement is used only on elements of an objects such as an array or a string) must live in one memory bank and will never cross memory bank boundaries. When this is true the high pointer byte does not need to be changed. However this stopped to be the case when long index feature for PIC18 was introduced and we missed its impact on pointer increment/decrement code. Hopefully this makes sence (let us know if we missed something)

 

Summary: compiler generates wrong code when pointer is incremented or decremented but only for PIC18 targets and only when long index compiler command line argument is used (-idx 2)

 

Fortunately this is very easy to fix and fix will be available in the next release (or patch).

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Thanks Pavel.

 

Who hasn't been there before when you change something to find it bites you further down the road.

 

I appreciate that it is diffucult to test all combinations of statements. That's why you have the forum to iron out the creases and produce a value for money product.

 

Look forward to the next release.

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

Thanks Reynard and Pavel. I too have been running into issues with structures using the large memory model but have been mostly seeing it in the simulator when using custom plugins so I blamed myself. I have not had much time to play lately so I have not taken the time to root cause my issues. It sounds like this could be part of it. I'll try the new version and keep an eye out for the next problem I see since older ones go away as I change code.

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...