Jump to content
Sign in to follow this  
swooshxx

Incompatibility with SASM v1.48?

Recommended Posts

When building my code through SourceBoost IDE, the target file is "removed".  The build goes fine, and the target file is correctly generated, but the IDE is deleting it immediately after build completes.

 

The funny thing is that if I invoke the assembler seperately (through SourceBoost IDE Build->assemble menu), it works just fine and doesn't delete my target file.

 

According to the SourceBoost log (below) SASM is returning an exit code of 1 even when successful, which is probably the problem.

 

Is there a way to get SourceBoost to ignore the assembler's "exit code" or leave the target file alone?

 

 

<SourceBoost IDE Log>

C2C-plus 5.3e C-compiler  Copyright© 1998-99,2000-2004 by Pavel Baranov

http://www.picant.com/c2c/c.html

support@picant.com

(Extended version, trial period day 1)

 

Licensed to: not registered

 

 

SXTEST.C

SXTEST.C(10): Warning: Truncation from 16-bit to 8-bit

Optimized 11 instruction(s)

 

 

Finished.

 

SASM Cross-Assembler for Scenix SX-based microcontrollers         Version 1.48

Copyright © 2000 Scenix Inc. All Rights Reserved.

 

140 lines compiled in 0.00 seconds

25 symbols

No error detected by the assembler.

C:\PROGRA~1\SOURCE~1\c2c.exe -PSX48BD -SRC -ols -md -O2 -oSXTEST.asm  SXTEST.C

C:\PROGRA~1\SOURCE~1\SASM.exe /P SX48 SXTEST.asm

Exit code was 1.

Removing target: SXTEST.hex

The system cannot find the file specified.

Done

 

Failed

</SourceBoost IDE Log>

Share this post


Link to post
Share on other sites
Guest Pavel
According to the SourceBoost log (below) SASM is returning an exit code of 1 even when successful, which is probably the problem.

Yes this SASM misbehaviour causes make that is used by Sourceboost to build a project fail. The workaround may be in writing a wrapper around SASM that will return 0 if assembling was sucsessful.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Pavel,

I too have this happen to me also.  Could you elaborate more.  Is what you mean to write like in c++ a return of the main() function.  Or am I misunderstanding this.  I have been under the assumption that when building it has been envoking the sasm to quickly and this causes the error.

Thanks

Share this post


Link to post
Share on other sites
Guest Pavel
I too have this happen to me also.  Could you elaborate more.  Is what you mean to write like in c++ a return of the main() function.  Or am I misunderstanding this.  I have been under the assumption that when building it has been envoking the sasm to quickly and this causes the error.

When "build" command gets invoked ide creates a make file (makefile.gen) based on the command lines set for the current toolsuit and than starts make.exe When make.exe parses rules in the makefile and executes commands from these rules it checks the return code for every such command assuming that zero means success and not zero is an error (this is how any make works). In case of an error it stops and in turn returns an error (you are right about the return code. the return code is the value returned by the "main" function or "WinMain" if this is a windows application). A wrapper for SASM should launch SASM with all command line options passed to the wrapper, wait till SASM execution completes, somehow check for possible errors (this may be tricky) and return 0 in case of success and something else in case of failure. Than the assembly command line set in SourceBoost IDE needs to be changed to refer to the wrapper rather than to SASM so that the ide will construct a rule in the generated makefile that will use the wrapper rather than SASM directly.

 

Regards,

Pavel

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...
Sign in to follow this  

×
×
  • Create New...