Assembler Macro Error Message


+ Reply to Thread
Results 1 to 10 of 10

Thread: Assembler Macro Error Message1094 days old

  1. #1
    jrusselltx
    Guest jrusselltx's Avatar

    0 Not allowed!

    Default Assembler Macro Error Message

    I keep getting errors in the Assembly process. Viewing the Assembler tab shows various errors in the Assembly listing of the general form:

    ERROR "CANNOT USE THE [email protected] MACRO DIRECTLY WHEN USING OPTIMISATION"

    The assembler terminates without creating any output.

    I tried two older (as in years old), one of which compiled OK, the other does not, with the same errors.

    How do I fix this?

    Thanks.

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,599
    Thumbs Up
    Received: 341
    Given: 162
    Total Downloaded
    1.99 GB

    0 Not allowed!

    Default Re: Assembler Macro Error Message

    What macro is it using?

    An older macro written by a user that used one of the compiler's internal macros will cause problems with newer compiler versions, as these were for the compiler's use, with the compiler controlling their use. If a user uses them, it stops the compiler from having control, so it must give an error if not used appropriately.

    Also, you can switch the optimiser off by:

    Declare Optimiser_Level = 0

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    jrusselltx
    Guest jrusselltx's Avatar

    0 Not allowed!

    Default Re: Assembler Macro Error Message

    The ones that create error messages are:

    GMOVFW MACRO PVARIN
    RLF MACRO PVARIN,PDESTINATION
    RRF MACRO PVARIN,PDESTINATION
    JUMP MACRO PLABEL
    [email protected] MACRO PDESTINATION
    [email protected] MACRO PDESTINATION


    Setting the optimiser to 0 removes the error messages from the .asm file, but there still isn't a hex file created by the assembler. A brief message box in red flashes on the screen and off saying there was an assembler error.

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #4
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,599
    Thumbs Up
    Received: 341
    Given: 162
    Total Downloaded
    1.99 GB

    0 Not allowed!

    Default Re: Assembler Macro Error Message

    Post your code because without any knowledge of device, user macros, compiler version etc, there is no way of diagnosing what the problem is.

    It will not be the compiler, but something in your program, because the compiler's macros have been in there since, literally, day one of the compiler's creation.

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #5
    jrusselltx
    Guest jrusselltx's Avatar

    0 Not allowed!

    Default Re: Assembler Macro Error Message

    OK. Code is attached. Oops. Attaching a file gets an FTP access error. Here it is in the text. Not very much there.

    '************************************************* ***************
    '* Name : 735.BAS *
    '* Author : Jim Russell *
    '* Notice : Copyright (c) 2017 Freedom Power Systems, Inc. 20 *
    '* : All Rights Reserved *
    '* Date : 6/3/2017 *
    '* Version : 0.0 *
    '* Notes : *
    '* : *
    '************************************************* ***************
    Device = 18F25K42 ' Device used in 735
    Xtal = 8
    Reminders = OFF ' Disable all reminders
    Optimiser_Level = 0 ' See if this fixes compiler errors

    ' Configuration bits to set
    ' The fuse names may be found at the end of the PICmicro's .PDI
    ' file, situated within the INCLUDES folder of the compiler's directory.
    ' C:\Program Files (x86)\ProtonIDE\PDS\Includes

    ' See .PDI file for default configuration bits that are set
    ' The assumption is that code executes first followed by any specifics
    ' set herein so that the default PDI file is unchanged.

    Config_Start
    MVECEN = On ; Interrupt contoller uses vector table to prioritze interrupts
    FEXTOSC = OFF ; Oscillator not enabled
    PWRTS = PWRT_64 ; Delay after MCLR releases for stability. Try making this shorter.
    Config_End

    ' Pin Definitions

    Symbol N12V_CL_Fault = PORTA.0
    Symbol SGND_EN = PORTA.3
    Symbol SGND_INH = PORTA.4
    Symbol FAIL = PORTA.5
    Symbol SYSRESET = PORTA.7
    Symbol DCM_LOGIC = PORTA.6
    Symbol LED_GRN = PORTC.0
    Symbol GA0 = PORTC.1
    Symbol GA1 = PORTC.2
    Symbol WARNING = PORTC.5
    Symbol N12_AUX_FLT = PORTC.6
    Symbol P3R3_AUX_EN = PORTC.7
    Symbol P3R3_AUX_FLT = PORTB.0
    Symbol CRITICAL = PORTB.3
    Symbol N12_FLT = PORTB.4
    Symbol LED_RED = PORTB.5
    Symbol I2C_Main = $40 ' Monitor for +12, +5, and +3.3
    Symbol I2C_Sec = $41 ' Monitor for -12, +12 Aux, and 3.3 Aux
    Symbol TMR_HI = $3C ' Value for Timer0 High value on reset
    Symbol TMR_LO = $AF ' Value for Timer0 Low value on reset. Load last.
    ' Value is 65535 - 50000 for 0.1 sec clock with 8 MHz Clock
    ' Dimensions for variables go here








    '************************************************* **************
    '
    'Initialize other variables need in the program here

    TRISA = $19 ' Set PORTA BITS 0,3,4 AS INPUT, OTHERS AS OUTPUT
    TRISB = $DF ' Set PORTB BITS as Input except B5
    TRISC = $7E ' Set PORTC bits as Input except 0 and 7
    PORTA = $40 ' DCM Outputs disabled. /FAIL off, /SYSRESET asserted (low)
    PORTB = 0 ' Turn RED LED OFf
    PORTC = $80 ' Disable 3.3V Aux
    T0CON0 = $10 ' TIMER0 16 bit, postscaler = 1:1. 2 uSec per count
    T0CON1 = $41 ' TIMER0 synchronous (Fosc/4), prescaler = 1:2. 2 uSec per count
    OSCFRQ = 3 ' Set clock to 8 MHz. Speed needs to be evaluated if fast enough.
    ' TMR0H = TMR_HI ' Set for 0.1 sec clock tics for now
    ' TMR0L = TMR_LO ' Loading this loads 16 bit value into Timer0
    T0CON0.7 = 1 ' Enable Timer0
    DCM_LOGIC = 1 ' Initalize with DCMs OFF
    P3R3_AUX_EN = 1 ' Initalize with 3.3 Aux OFF

    Clear ' Clear all RAM before we start

    'HRSOut CR,LF,LF,"FP735 VITA62 POWER SUPPLY REVISION 0.0 6/5/17", CR, LF
    'HRSOut "COPYRIGHT 2017 FREEDOM POWER SYSTEMS, INC.", CR,LF


    '************************************************* ***************
    ' Interrupt Handlers
    '************************************************* ***************




    '************************************************* ***************
    Main:
    '************************************************* ***************

    '************************************************* ***************
    ' Test ENABLE and INHIBIT LINES and act on them
    '************************************************* ***************
    If SGND_EN = 1 Then P3R3_AUX_EN = 1
    If SGND_EN = 1 Then
    If SGND_INH = 1 Then DCM_LOGIC = 1
    Else DCM_LOGIC = 0
    EndIf

    DelayMS 100

    GoTo Main

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #6
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,599
    Thumbs Up
    Received: 341
    Given: 162
    Total Downloaded
    1.99 GB

    0 Not allowed!

    Default Re: Assembler Macro Error Message

    I've tried it, and it compiles without any errors.

    I adjusted the Optimiser_Level from 0 to 3 and it still compiles without any errors.

    What version of the compiler are you using?

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  13. #7
    jrusselltx
    Guest jrusselltx's Avatar

    0 Not allowed!

    Default Re: Assembler Macro Error Message

    Compiler is 3.5.9.6. I just downloaded and installed this one a few days ago to replace the old one I had been using.

  14. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  15. #8
    RobertBishop
    Guest RobertBishop's Avatar

    0 Not allowed!

    Default Re: Assembler Macro Error Message

    I made several attempts to compile code for the 18F25K42 using Proton.
    While there were no errors indicated during compilation -- none of the test programs would run properly.

    Since the 18F25K42 is not listed as a supported MPU this was not an unexpected outcome

    I switched to another compiler with 18F25K42 support and fell in love with the MPU.
    Hopefully one day soon 18F25K42 will be added to the Proton supported MPU list.

  16. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  17. #9
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    526
    Thumbs Up
    Received: 60
    Given: 0
    Total Downloaded
    408.14 MB

    0 Not allowed!

    Default Re: Assembler Macro Error Message

    The 18FxxK42 family is a very different beast from previous 18F's. It's the first to extend ram memory past the 4K boundary.
    It has all the SFR registers located way up in memory in banks 56-63 ($3800), so it'd likely take some changes to deal with that.

    Most of the standard instructions can only address 4K of ram so they added a new three-byte asm instruction MOVFFL to access ram > 4K.
    Couple that with the big changes to the vectored interrupt table and Les would have a lot of work on his hands!

    There's a number of up and coming 18F devices like this.

  18. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  19. #10
    RobertBishop
    Guest RobertBishop's Avatar

    0 Not allowed!

    Default Re: Assembler Macro Error Message

    Yes, tumbleweed - it will take a good bit of work to incorporate these changes in MPU architecture into any Basic compiler - and as I understand there is not a large programming team hard at work on the Proton compiler

    But I think the K42 family is a sign of things to come from Microchip.

    I do a great deal of scientific programming -- so the new built-in
    K42 peripherals are of keen interest to me.
    I'm currently using a Microchip compiler to code the 18FxxK42 family and even for someone with 45 years of programming experience -- it is well - an experience

    I use Basic because decades ago I was a big proponents of Basic - having co-written a Basic compiler for the RCA 1802 when I worked with an RCA affiliated company -- I fell in love with the concept that Basic could handle most of the housekeeping chores and allow one more time to innovate and invent.

    These days I'm less interested in coding -- and more interested in quickly producing scientific instruments to explore the more "fringe" areas of science.
    As one ages time becomes exponentially more valuable - and a good Basic compiler can save a good bit of that time.

    I am grateful for the work of the fine folks who support Proton Basic.


  20. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. error message help needed
    By jimbohoho in forum Website / Forum Issues
    Replies: 8
    Last Post: 9th June 2015, 11:59
  2. [SOLVED !] Problem with Writetimer0 macro or assembler?
    By J J Larsen in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 13th September 2010, 21:43
  3. error message
    By C_Moore in forum Fuse Configurator
    Replies: 1
    Last Post: 7th April 2010, 01:02
  4. Error message during compilation
    By [email protected] in forum Proton Plus Compiler v3
    Replies: 0
    Last Post: 12th February 2008, 16:39

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts