Code Monkey home page Code Monkey logo

Comments (6)

ericb59 avatar ericb59 commented on August 30, 2024

from fusion-c-v1.2.

 avatar commented on August 30, 2024

I'm afraid that one doesn't build:

gcc -c -std=c99 -O2 -Wall -pedantic hex2bin.c -o hex2bin.o
hex2bin.c: In functie ‘main’:
hex2bin.c:212:17: let op: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  212 |                 if (temp > Highest_Address)
      |                 ^~
hex2bin.c:214:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  214 |                     if (Verbose_Flag) fprintf(stderr,"Highest_Address: %08X\n",Highest_Address);
      |                     ^~
gcc -c -std=c99 -O2 -Wall -pedantic common.c -o common.o
gcc -c -std=c99 -O2 -Wall -pedantic libcrc.c -o libcrc.o
gcc -c -std=c99 -O2 -Wall -pedantic binary.c -o binary.o
gcc -O2 -Wall -o hex2bin hex2bin.o common.o libcrc.o binary.o
/usr/bin/ld: common.o:(.data+0xc): multiple definition of `Pad_Byte'; hex2bin.o:(.bss+0xa4): first defined here
/usr/bin/ld: common.o:(.bss+0x38): multiple definition of `Batch_Mode'; hex2bin.o:(.bss+0x3c): first defined here
/usr/bin/ld: common.o:(.bss+0xa0): multiple definition of `Filin'; hex2bin.o:(.bss+0xb0): first defined here
/usr/bin/ld: common.o:(.bss+0x98): multiple definition of `Filout'; hex2bin.o:(.bss+0xa8): first defined here
/usr/bin/ld: common.o:(.bss+0x88): multiple definition of `Checksum'; hex2bin.o:(.bss+0x98): first defined here
/usr/bin/ld: common.o:(.bss+0x90): multiple definition of `Enable_Checksum_Error'; hex2bin.o:(.bss+0xa0): first defined here
/usr/bin/ld: common.o:(.bss+0x84): multiple definition of `Record_Nb'; hex2bin.o:(.bss+0x94): first defined here
/usr/bin/ld: common.o:(.bss+0x8c): multiple definition of `Status_Checksum_Error'; hex2bin.o:(.bss+0x9c): first defined here
/usr/bin/ld: common.o:(.bss+0x4c): multiple definition of `Floor_Address_Setted'; hex2bin.o:(.bss+0x50): first defined here
/usr/bin/ld: common.o:(.bss+0x48): multiple definition of `Ceiling_Address_Setted'; hex2bin.o:(.bss+0x4c): first defined here
/usr/bin/ld: common.o:(.bss+0x5c): multiple definition of `Floor_Address'; hex2bin.o:(.bss+0x60): first defined here
/usr/bin/ld: common.o:(.data+0x4): multiple definition of `Ceiling_Address'; hex2bin.o:(.bss+0x64): first defined here
/usr/bin/ld: common.o:(.bss+0x2c): multiple definition of `Cks_Type'; hex2bin.o:(.bss+0x30): first defined here
/usr/bin/ld: common.o:(.data+0x0): multiple definition of `Crc_Poly'; hex2bin.o:(.bss+0x10): first defined here
/usr/bin/ld: common.o:(.bss+0xc): multiple definition of `Crc_Init'; hex2bin.o:(.bss+0xc): first defined here
/usr/bin/ld: common.o:(.bss+0x8): multiple definition of `Crc_XorOut'; hex2bin.o:(.bss+0x8): first defined here
/usr/bin/ld: common.o:(.bss+0x20): multiple definition of `Cks_Addr'; hex2bin.o:(.bss+0x24): first defined here
/usr/bin/ld: common.o:(.bss+0x74): multiple definition of `Lowest_Address'; hex2bin.o:(.bss+0x80): first defined here
/usr/bin/ld: common.o:(.bss+0x30): multiple definition of `Endian'; hex2bin.o:(.bss+0x34): first defined here
/usr/bin/ld: common.o:(.bss+0x78): multiple definition of `Memory_Block'; hex2bin.o:(.bss+0x88): first defined here
/usr/bin/ld: common.o:(.bss+0x10): multiple definition of `Force_Value'; hex2bin.o:(.bss+0x14): first defined here
/usr/bin/ld: common.o:(.bss+0x70): multiple definition of `Highest_Address'; hex2bin.o:(.bss+0x7c): first defined here
/usr/bin/ld: common.o:(.bss+0x60): multiple definition of `Max_Length'; hex2bin.o:(.bss+0x6c): first defined here
/usr/bin/ld: common.o:(.bss+0x54): multiple definition of `Minimum_Block_Size_Setted'; hex2bin.o:(.bss+0x58): first defined here
/usr/bin/ld: common.o:(.bss+0x14): multiple definition of `Cks_Addr_set'; hex2bin.o:(.bss+0x18): first defined here
/usr/bin/ld: common.o:(.data+0x8): multiple definition of `Minimum_Block_Size'; hex2bin.o:(.bss+0x68): first defined here
/usr/bin/ld: common.o:(.bss+0x58): multiple definition of `Module'; hex2bin.o:(.bss+0x5c): first defined here
/usr/bin/ld: common.o:(.bss+0x18): multiple definition of `Cks_range_set'; hex2bin.o:(.bss+0x1c): first defined here
/usr/bin/ld: common.o:(.bss+0x28): multiple definition of `Cks_Start'; hex2bin.o:(.bss+0x2c): first defined here
/usr/bin/ld: common.o:(.bss+0x24): multiple definition of `Cks_End'; hex2bin.o:(.bss+0x28): first defined here
/usr/bin/ld: common.o:(.bss+0x1c8): multiple definition of `crc_table'; hex2bin.o:(.bss+0x1e8): first defined here
/usr/bin/ld: common.o:(.bss+0x44): multiple definition of `Max_Length_Setted'; hex2bin.o:(.bss+0x48): first defined here
/usr/bin/ld: common.o:(.bss+0x1c): multiple definition of `Cks_Value'; hex2bin.o:(.bss+0x20): first defined here
/usr/bin/ld: common.o:(.bss+0x4): multiple definition of `Crc_RefIn'; hex2bin.o:(.bss+0x4): first defined here
/usr/bin/ld: common.o:(.bss+0x50): multiple definition of `Starting_Address_Setted'; hex2bin.o:(.bss+0x54): first defined here
/usr/bin/ld: common.o:(.bss+0x64): multiple definition of `Records_Start'; hex2bin.o:(.bss+0x70): first defined here
/usr/bin/ld: common.o:(.bss+0x6c): multiple definition of `Starting_Address'; hex2bin.o:(.bss+0x78): first defined here
/usr/bin/ld: common.o:(.bss+0x80): multiple definition of `Nb_Bytes'; hex2bin.o:(.bss+0x90): first defined here
/usr/bin/ld: common.o:(.bss+0x68): multiple definition of `Phys_Addr'; hex2bin.o:(.bss+0x74): first defined here
/usr/bin/ld: common.o:(.bss+0x40): multiple definition of `Swap_Wordwise'; hex2bin.o:(.bss+0x44): first defined here
/usr/bin/ld: common.o:(.bss+0x34): multiple definition of `Verbose_Flag'; hex2bin.o:(.bss+0x38): first defined here
/usr/bin/ld: common.o:(.bss+0xb0): multiple definition of `Extension'; hex2bin.o:(.bss+0xc0): first defined here
/usr/bin/ld: common.o:(.bss+0x3c): multiple definition of `Address_Alignment_Word'; hex2bin.o:(.bss+0x40): first defined here
/usr/bin/ld: common.o:(.bss+0x0): multiple definition of `Crc_RefOut'; hex2bin.o:(.bss+0x0): first defined here
/usr/bin/ld: common.o:(.bss+0xc0): multiple definition of `Filename'; hex2bin.o:(.bss+0xe0): first defined here
/usr/bin/ld: libcrc.o:(.bss+0x0): multiple definition of `crc_table'; hex2bin.o:(.bss+0x1e8): first defined here
collect2: fout: ld gaf exit-status 1 terug
make: *** [Makefile:23: hex2bin] Fout 1

Using gcc versie 10.2.0 (GCC)

from fusion-c-v1.2.

ericb59 avatar ericb59 commented on August 30, 2024

Too bad !
Ok so with your other Hex2Bin version you need to Edit and modify the Fusion-c Compilation script.
Open the makefile, and identify the line with the hex2bin function.
you must see this :
@hex2bin -e com $^
@cp $@ $(DEST)

Modify it, to match the command arguments needed by your Hex2bin.
it must be something like this:
hex2bin -I $^ -o output.com
@cp output.com $(DEST)

The final file's name on the MSX side will be "output.com"

I'm not expert in linux and Makefile edition.
So , I hope it can works.

from fusion-c-v1.2.

 avatar commented on August 30, 2024

The changes to the Makefile you provided seemed work, but the hex2bin I'm using does not seem to provide a file that when ran on an MSX responds with the expected output (attached). I have changed this issue to finding a suitable hex2bin that will work on modern Linux platforms.

output.com.gz

from fusion-c-v1.2.

ericb59 avatar ericb59 commented on August 30, 2024

Yes, this .com does't seems to work.
it's really weird that the standard version of Hex2bin doesn't work on your distribution.
Unfortunately I don't know how to fix the problem. Try asking the Linux community for a solution?
Or maybe posting to WWW.MSX.ORG, maybe someone already has a solution?

from fusion-c-v1.2.

 avatar commented on August 30, 2024

I could build by patching all the header files and putting extern in front of all globals, see bitcraze/crazyflie-firmware#613

This was suggested to me by several member of msx.org (https://www.msx.org/forum/msx-talk/development/cant-build-hex2bin-on-linux). The patch is also in that thread.

Since the hex2bin version used by this projects seems to be unmaintained, is it possible for you to adopt the patched version here? If not, you can always refer people to the thread mentioned.

Thanks!

from fusion-c-v1.2.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.