Jump to content
Sign in to follow this  
jartim

Compiler hangs with in-line assembly

Recommended Posts

Bug description:

Compiler hangs indefinitely with the following source -

Steps to reproduce:

This file is "TClass.hpp" -

unsigned char ReadFlash(unsigned int FlashAddr)
{
    asm 
    {
        _tblptru = 0
        _tblptrh = _FlashAddr
        _tblptrl = _FlashAddr+1
        tblrd*
    }
    
    return tablat;
}

 

Expected behaviour:

This should compile with no errors

 

Is the problem 100% reproduceable:

100% every time

 

IDE version:   MPLAB-X V4.20

Compiler:               BoostC++

Compiler version:     V7.43

Target device: PIC18F8527

OS:                     Win 7

 

Comments:

Compiles if the three lines relating to _tblptrx are commented out.

Share this post


Link to post
Share on other sites

Compiler hanging is not good and we will look into this but your code does not look correct either. Everything inside the asm{} block should be assembly language. Anything else including C statements like _tblptru = 0 will not work.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Hi Pavel

You are 100% correct, I was changing the coding from assembler to C and wasn't concentrating!

Please disregard my original post.

 

Regards

Tim 

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
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...
Sign in to follow this  

×