Re: [Flashforth-devel] PIC18 has been updated to compile with PIC-AS
Brought to you by:
oh2aun
From: Peter J. <pe...@me...> - 2022-01-15 12:56:17
|
Mikael, I dusted off my other boards and updated those build and install sections. https://pajacobs-ghub.github.io/flashforth/ff5-tutorial-guide.html#_building_for_the_pic24fv32ka302 I also tried to build and use FF on a PIC18F16Q40 by adapting your config for a 16Q41. Although I got the chip programmed and the interpreter starting ok, it would not write new definitions to flash memory. Here is a sample of the session with the programmer still attached to the ICSP pins. After exercising words, I sent a file containing my little flash-led text. FlashForth 5 PIC18F16Q40 01.01.2022 words p2+ p++ pc@ @p hi d. ud. d> d< d= d0< d0= dinvert d2* d2/ d- d+ dabs ?dnegate dnegate s>d rdrop endit next for in, inline repeat while again until begin else then if until, again, begin, else, then, if, not, nc, nz, z, br? dump .s words >pr .id ms ticks s0 latest state bl 2- ['] -@ ; :noname : ] [ lst does> postpone create cr [char] ( char ' abort" ?abort ?abort? abort prompt quit true false .st inlined immediate shb interpret source. >in tiu tib ti# number? >number a> >a ud/mod ud* sign? digit? find immed? (f) c>n n>c @+ c@+ place cmove word parse \ /string source user base pad hp task ulink bin hex decimal . u.r u. sign #> #s # digit <# hold up min max ?negate tuck nip / u*/mod u/ * u/mod um/mod um* 'key? 'key 'emit p+ pc! p! p@ r>p !p>r !p u> u< > < = 0< 0= <> within +! 2/ 2* >body 2+ 1- 1+ negate invert xor or and - m+ + abs dup r@ r> >r rot over swap drop allot ." ," s" (s" type accept 1 umax umin spaces space 2swap 2over 2dup 2drop 2! 2@ cf, chars char+ cells cell+ aligned align cell c, , here dp ram eeprom flash c@ @ c! ! sp. sp@ 2constant constant co: 2variable variable @ex execute key? key emit empty pps- pps+ btfss, btfsc, bsf, bcf, bra, rcall, call, goto, br3 br2 as3 as2 as1 rshift lshift ic, i, operator Fcy mtst mclr mset iflush pause turnkey is to defer value cwd u1- u1+ fl+ fl- >tblp literal int! ;i di ei scan skip n= ver warm i] [i andlw, movlb, movlw, movwf movf, w, a, rx1? rx1 tx1 exit marker ok<#,ram> -flash-led -flash-led ? marker -flash-led S FlashForth 5 PIC18F16Q40 01.01.2022 $c4c0 constant latc S FlashForth 5 PIC18F16Q40 01.01.2022 $c4c8 constant trisc S FlashForth 5 PIC18F16Q40 01.01.2022 : init 1 trisc mclr ; \ want RC0 as output trisc ? : do_output latc c@ 1 xor latc c! ; \ toggle RC0 latc ? : wait #500 ms ; S FlashForth 5 PIC18F16Q40 01.01.2022 : main init begin do_output wait again ; init ? main main ? When I remove the programmer and power up the microcontroller, it resets itself every couple of seconds. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC Any hints as to what I am doing wrong? I have the microcontroller mounted on a bit of strip-board with the bare minimum of support so I may not be giving it the electrical environment that it needs. I will need to give it some thought... Cheers, Peter J. On 13/1/22 1:07 am, Mikael Nordman wrote: > Peter, > Thanks for updating the guide. > Maybe you can also update the PIC24 and AVR build chapters? Both build > have changed. > > The PIC24-30-33 config bit are now set in a configs.c file. > > AVR is built with the AVR-AS (XC8) compiler. > Also the names of the prebuilt hex files and the fuse values have > changed. > > BR Mikael > > > On 2022-01-10 13:32, Peter Jacobs wrote: >> Mikael, >> It works nicely for the PIC18F26K22 at FOSC=64MHz if I change PLL to >> PLL_ENABLE on line 44 of p18f2x4xk22.inc. >> >> I have updated a couple of sections of the tutorial document at >> https://pajacobs-ghub.github.io/flashforth/ff5-tutorial-guide.html to >> reflect your new code. >> >> I have yet to try some of the newer Q-family chips but I guess that >> new projects should use those. They look very capable. >> >> Cheers, >> Peter Jacobs >> >> >> On 8/1/22 4:40 pm, Mikael Nordman wrote: >>> Greetings. >>> Microchip has dropped support of MPASM for new chips and new IDE >>> versions. >>> After a lot of work FF has been updated to compile with PIC-AS. >>> MPASM support has been dropped in order to develop only one version >>> of FF. >>> >>> Improvements include support for the Q41 and Q43 chips. >>> Another improvement is the simultanous support for up to 3 UARTS. >>> The linker files are not used anymore, but instead some PIC-AS >>> command line options must be used. >>> >>> I have tested with 18f14k50 18f25k50 18f2455 18f26k42 18f26k83 >>> 18f16q41. >>> Please report any bugs. >>> >>> Best wishes for the new year. >>> Mikael >>> >>> >>> >>> >>> _______________________________________________ >>> Flashforth-devel mailing list >>> Fla...@li... >>> https://lists.sourceforge.net/lists/listinfo/flashforth-devel >> >> >> >> >> _______________________________________________ >> Flashforth-devel mailing list >> Fla...@li... >> https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |