Git Product home page Git Product logo

fx2lib's People

Contributors

cannon-zz avatar codepainters avatar danielo avatar djmuhlestein avatar forrestv avatar makestuff avatar mithro avatar simonachmueller avatar ssaury avatar stargazer-24 avatar stefanbruens avatar svenschnelle avatar tai avatar vpelletier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fx2lib's Issues

Multiple configuration descriptors

I'm trying to add a configuration descriptor to a firmware. I belive this is not supported by lib/setupdat.c, as it always returns the descriptor at pDevConfig, which is either highspd_dscr or fullspd_dscr from dscr.a51 .
I've succeeded adding support for several descriptors, but I cannot figure of a backward-compatible way without involving several #ifdef as I require new exports from dscr.a51.

Please review my patch: vpelletier/fx2lib@f98866cc4bb88c0179d3f9c05c77fc2ebecfe2dc .

I'm unsure of intended coding style (indentation especially).

Arch Linux SDCC 3.6.0-4 build fail

Build is failing with Arch Linux because of the newer version of SDCC (3.6.0-4)

make
for a in dscr.a51; do \
 cp $a build/; \
 cd build && sdas8051 -logs `basename $a` && cd ..; done
for s in bulkloop.c; do \
 THISREL=$(basename `echo "$s" | sed -e 's/\.c$/\.rel/'`); \
 sdcc -mmcs51  --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -c -I ../..//include -I "" $s -o build/$THISREL ; done
bulkloop.c:177: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
bulkloop.c:178: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
sdcc -mmcs51  --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -o build/bulkloop.ihx build/bulkloop.rel build/dscr.rel fx2.lib -L ../..//lib
make: *** [../../lib/fx2.mk:85: build/bulkloop.ihx] Error 1

Failing commands:

sdcc -mmcs51  --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -o build/bulkloop.ihx build/bulkloop.rel build/dscr.rel fx2.lib -L ../..//lib -V
+ /usr/bin/sdld -nf build/bulkloop.lk
+ /usr/bin/sdld -nf build/bulkloop.lk returned errorcode 139

/usr/bin/sdld -f build/bulkloop.lk                   
ASlink >> -f build/bulkloop.lk
ASlink >> -muwx
ASlink >> -i build/bulkloop.ihx
ASlink >> -M
ASlink >> -Y
ASlink >> -X 0x0200
ASlink >> -C 0x3c00
ASlink >> -b HOME = 0x0000
ASlink >> -b XSEG = 0x3c00
ASlink >> -b PSEG = 0x3c00
ASlink >> -b ISEG = 0x0000
ASlink >> -b BSEG = 0x0000
ASlink >> -b DSCR_AREA=0x3e00
ASlink >> -b INT2JT=0x3f00
ASlink >> -k ../..//lib
ASlink >> -k /usr/bin/../share/sdcc/lib/small
ASlink >> -k /usr/share/sdcc/lib/small
ASlink >> -l fx2.lib
[1]    21459 segmentation fault (core dumped)  /usr/bin/sdld -f build/bulkloop.lk

If sdcc is downgraded to 3.6.0-3 the examples builds successfully:

downgrade sdcc

No handle_get_descriptor hook

The official SDK has a DR_GetDescriptor() function that you can implement to handle HID descriptors, etc.
fx2lib currently requires modifying setupdat.[hc] to support HID.
Ideally there should be a way to hook into this without modifying the core library.

ihx2iic.py broken for python3?

When I run this tool, I get an error:
$ python ihx2iic.py
File "/e/src/fx2lib/utils/ihx2iic.py", line 35
raise ValueError, "Length must be even"

I am not very good at Python, is it not compatible for python3?
If so how to fix it :)

Examples build problem with latest sdcc svn version

I have problems build the examples with latest svn version of sdcc (built from source today). Tested under Ubuntu Linux 20.04 as well as Windows 10/11.

There are no issues if I build with sdcc 3.8 version from Ubuntu 20.04.

mcuee@UbuntuSwift3:~/build/8051/fx2lib$ sdcc -v
SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/sm83/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502 TD- 4.2.14 #14088 (Linux)
published under GNU General Public License (GPL)

cuee@UbuntuSwift3:~/build/8051/fx2lib$ make -i
make -C lib
make[1]: Entering directory '/home/mcuee/build/8051/fx2lib/lib'
sdcc -mmcs51  -I../include -c serial.c -o serial.rel
../include/serial.h:55: warning 283: function declarator with no prototype
serial.c:72: warning 283: function declarator with no prototype
sdcc -mmcs51  -I../include -c i2c.c -o i2c.rel
sdcc -mmcs51  -I../include -c delay.c -o delay.rel
sdcc -mmcs51  -I../include -c setupdat.c -o setupdat.rel
../include/setupdat.h:152: warning 283: function declarator with no prototype
setupdat.c:34: warning 283: function declarator with no prototype
setupdat.c:39: warning 283: function declarator with no prototype
setupdat.c:48: warning 283: function declarator with no prototype
setupdat.c:50: warning 283: function declarator with no prototype
setupdat.c:53: warning 283: function declarator with no prototype
setupdat.c:57: warning 283: function declarator with no prototype
setupdat.c:72: warning 283: function declarator with no prototype
setupdat.c:161: warning 283: function declarator with no prototype
setupdat.c:206: warning 283: function declarator with no prototype
setupdat.c:236: warning 283: function declarator with no prototype
setupdat.c:310: warning 283: function declarator with no prototype
sdcc -mmcs51  -I../include -c gpif.c -o gpif.rel
sdcc -mmcs51  -I../include -c eputils.c -o eputils.rel
...
sdas8051 -logs usbav.a51
sdar -rc fx2.lib serial.rel i2c.rel delay.rel setupdat.rel gpif.rel eputils.rel interrupts/spare_isr.rel interrupts/usbreset_isr.rel interrupts/ep6ff_isr.rel interrupts/ep6ef_isr.rel interrupts/ep0ping_isr.rel interrupts/sutok_isr.rel interrupts/ep6ping_isr.rel interrupts/ep4_isr.rel interrupts/ep4ping_isr.rel interrupts/ep1ping_isr.rel interrupts/ep1out_isr.rel interrupts/ep4ef_isr.rel interrupts/errlimit_isr.rel interrupts/ep8isoerr_isr.rel interrupts/gpifwf_isr.rel interrupts/ep6_isr.rel interrupts/ep6isoerr_isr.rel interrupts/gpifdone_isr.rel interrupts/ep4isoerr_isr.rel interrupts/suspend_isr.rel interrupts/ep2ping_isr.rel interrupts/ep8_isr.rel interrupts/ep0in_isr.rel interrupts/ep2pf_isr.rel interrupts/ep2_isr.rel interrupts/ep8pf_isr.rel interrupts/ep8ff_isr.rel interrupts/ep1in_isr.rel interrupts/sof_isr.rel interrupts/ep0ack_isr.rel interrupts/ep2ff_isr.rel interrupts/sudav_isr.rel interrupts/ep2ef_isr.rel interrupts/ep0out_isr.rel interrupts/hispeed_isr.rel interrupts/ep2isoerr_isr.rel interrupts/ep8ef_isr.rel interrupts/ibn_isr.rel interrupts/ep8ping_isr.rel interrupts/ep4ff_isr.rel interrupts/ep6pf_isr.rel interrupts/ep4pf_isr.rel usbav.rel
make[1]: Leaving directory '/home/mcuee/build/8051/fx2lib/lib'
make -C examples
make[1]: Entering directory '/home/mcuee/build/8051/fx2lib/examples'
make -C bulkloop 
make[2]: Entering directory '/home/mcuee/build/8051/fx2lib/examples/bulkloop'
mkdir -p build
sdcc -mmcs51  -c -o build/bulkloop.rel -I ../..//include -I "" build/../bulkloop.c
...
build/../bulkloop.c:201: syntax error: token -> 'SUDAV_ISR' ; column 38
make[2]: [../../lib/fx2.mk:83: build/bulkloop.rel] Error 1 (ignored)
...
build/../debugdev.c:204: syntax error: token -> 'SUDAV_ISR' ; column 38
make[2]: [../../lib/fx2.mk:83: build/debugdev.rel] Error 1 (ignored)
...
build/../debugdev.c:310: syntax error: token -> 'SUDAV_ISR' ; column 38
make[2]: [../../lib/fx2.mk:83: build/debugdev.rel] Error 1 (ignored)
...
build/../eeprom.c:159: syntax error: token -> 'SUDAV_ISR' ; column 38
make[3]: [../../../lib/fx2.mk:83: build/eeprom.rel] Error 1 (ignored)
...
build/../serial.c:33: syntax error: token -> '3' ; column 31
make[2]: [../../lib/fx2.mk:83: build/serial.rel] Error 1 (ignored)
...
build/../timers.c:29: syntax error: token -> 'TF0_ISR' ; column 37
make[2]: [../../lib/fx2.mk:83: build/timers.rel] Error 1 (ignored)
...
build/../usbmon.c:205: syntax error: token -> 'SUDAV_ISR' ; column 38
make[2]: [../../lib/fx2.mk:83: build/usbmon.rel] Error 1 (ignored)
sdas8051 -logs build/dscr.rel build/../dscr.a51
sdcc -mmcs51  -o build/usbmon.ihx build/usbmon.rel build/dscr.rel fx2.lib --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -L ../..//lib 
?ASlink-Error-<cannot open> : "build/usbmon.rel"
make[2]: [../../lib/fx2.mk:80: build/usbmon.ihx] Error 1 (ignored)
make[2]: Leaving directory '/home/mcuee/build/8051/fx2lib/examples/usbmon_c'
make[1]: Leaving directory '/home/mcuee/build/8051/fx2lib/examples'

syntax error token 'at'

Can anyone help with this. What am I missing here?

make -C lib
sdcc -mmcs51 -I../include -c serial.c -o serial.rel
../include/fx2regs.h:43: syntax error: token -> 'at' ; column 8
make[1]: *** [serial.rel] Error 1
make: *** [all] Error 2

sdcc:
SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.2.0 #8008 (Feb 26 2013) (Mac OS X x86_64)

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.