If someone wants to give it a try, I can give some support.
Basically what needs to be done is to enlarge the flash write buffer.
The alternate interrupt vectors should be moved to ram because of the large
flash block size.
The flash write strategy should be slightly changed so that flash writes only occur
when really needed. That should be needed only when compiling code that subsequent
words need to execute before the the flash would otherwise be written.
Probably the user would need to be aware of when to write to flash.
Mikael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
at the moment I'm waiting for the delivery of a 30F4013 to start with your flashforth. The goal is to run it on a PIC24F16KA101 (102) (one of the new XLPs). So can you support me with infos about the memory map. The Mplab simulator stops at line 204:
__AddressError:
__StackError:
__MathError:
and I don't know where the error occurs (I have not much experience with the simulator, I prefer hardware with a debugger).
A few years ago (about 17) I wrote a Crosscompiler (Hosted on a Macintosh - Forthmacs) for a 16bit Transputer and 1981 / 82 a Forth for 6809 - so I think I'll try it with the microchip controllers.
Bye,
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The CPU part of the PIC24 and 33 are pretty similar so I quess the same code
should work , as long as the memory map and configuration bits are taken care of.
Is the UART the same for PIC30 and 24/33 ? If not, maybe some work is needed there also.
Mikael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It turns out to be an excellent platform for FlashForth.
It has EEPROM and a 96 byte flash erase block size.
FF for the dsPIC30 should be easy to port to this new
Microchip processor family.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Have you considered FlashForth for the XGameStation boards?
There are 2 boards currently shipping that use the PIC24.
The XGS PIC 16 uses the PIC24HJ256GP206 running at 40MHz. The board has connectors and drivers for PS2, VGA, NTSC, Audio, serial, Micro SD card, SPI, I2C and NES compatible DB9. It is a bit bigger than a credit card.
The other board, The Chameleon PIC, is nearly the same (PS2, VGA, NTSC, Audio, mini USB, ISP and other breakouts). What differs is that it uses the PIC24HJ128GP502 (40MHz) and it has a Propeller chip onboard too !!!
Hi,
Those pic24hj chips have no eeprom and the flashbuffersize is 1,5 Kbytes. So as I have mentioned in some earlier posts, a redesign is needed for getting FF to work on those.
Does the XGS come with a bootloader ? I suppose you would like to keep the bootloader.
If so, perhaps a version that works with the bootloader could be worth looking into.
Does the hypotethical bootloader allow the application code to write into the flash ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am about to assemble a DsPIC33FJ256GP506A (256KByte Flash, 16KByte Ram).
I came accros Flash Forth and think it will work well with the board.
The board I have built to emulate an old ISA multi I/O board that had 24 digital and 8 analog on a 40 pin header.
I have the unused pins on a seperate header.
There is USB(FTDI), (RS232 or RS485) and CAN BUS available for comms.
I will try making the necesery changes to FF for this DsPIC33.
Regards Peter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Peter,
Thats great,
I have actually started by writing some new code for the flash handling of the PIC24.
It should have the same flash handling as the PIC33.
I can send that to you as a base, it was running in the simulator. already last spring.
Mikael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a couple of projects I need to produce with the PIC24F series micro controller.
I am like to in Forth for doing the projects.
I am willing to port the FlashForth to the PIC24.
If anyone is proceeding with such, I am willing to help.
I have serveral years experience (over 15) with MVP forth and LMI forth, mostly 8086 based system.
If anyone has started porting forth for the PIC24 I am willing to help out (beats starting from ground zero).
Please let me know if someone has began converting the PIC18 to execute on the PIC24.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I may be missing something. PIC18 is an eight bit system while PIC24 is a sixteen bit hardware.
Are you saying that all I have to do is configure MPLAB IDE as a PIC24 device and it will compile a kernal for PIC24?
I looked through the FlashForth kernal and as far as I can tell, there are not any config files for the PIC24.
I find this hard to believe, can you provide a bit more detail?
Thank you for your responce.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When you are ready to download FlashForth for the PIC24,
be sure to click on "Browse All Files" on the Source Forge - FlashForth page,
then select "flashforth_24-30-33"
FF4.8.zip is the latest for the PIC24.
Pete
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I compiled the original source but changed the target processor to PIC2464GA102. The compile did not show any errors. Then I tried to determine which physical I/O was being used by the Forth system. The 'p24fj_config.inc" file did not have U1RXPIN, PRINR18VAL OR U1TXPIN declared. Also in the 'p24fj_config.inc" file the are some baud rate calculations that use an undeclared constant named "FREQ". At the end of the file these calculations are executed again and "FREQ" is replaced with "FCY" which is the correct constant which was declared earlier in the file. I looked in the "p24f_config.inc" file and the UART #1 pins where defined. These pins are available on the PIC24FJ64GA102 so I an going to add them to the "p24f_conif.inc" file. Don't know if I will be able to get back to this project until the weekend.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Me and apparently nobody else either has put FF on on the FJ series.
I have used the HJ series for developing the pic24 code.
It also also been run on the dsPIC30 and dsPIC33.
Lets hope it works by adding those config items.
Mike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm new to this product family (p24/33) but have a very large potential application for ff on p24/33. Any help at all in shortening my learning curver would be greatly welcomed and will hasten the deployment of this very hi volume app.
svpainter13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm interested in putting Forth on the PIC24FJ256GA106, however, I have no experience with the Microchip MPLAB tools. Is there a tutorial available that would get me over this 'little hurdle'? My preference is to dive into Forth in the PIC and not take too much time getting there.
Any help is greatly appreciated!
Regards,
Michael
K6MLE
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Its difficult to make a generic instruction.
For your chip some reading of the datasheet
and some adaptation may be needed.
The PIC24FJ256GA106 appears to need a different configuration than the
one present in the p24fj_config.inc file.
Not all FJ series chips are born compatible :-(
At least the fixes mentioned by 'kgene' are needed.
Also the flash erase/write block sizes are different.
There could be other differences also.
UART1 is default for the operator task.
In general you need to install MPLAB and open the FF.mcw workspace file.
You will need to add the linker file path to the project library path.
With F10 you can compile the project and generate a hex file.
The hex file is programmed with for example pickit2 to the target.
Mike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Mikael,
did you already port your flashforth to the PIC24 or dsPIC33 family?
Michael
No,
I do not have the time at the moment.
If someone wants to give it a try, I can give some support.
Basically what needs to be done is to enlarge the flash write buffer.
The alternate interrupt vectors should be moved to ram because of the large
flash block size.
The flash write strategy should be slightly changed so that flash writes only occur
when really needed. That should be needed only when compiling code that subsequent
words need to execute before the the flash would otherwise be written.
Probably the user would need to be aware of when to write to flash.
Mikael
Hi Mikael,
at the moment I'm waiting for the delivery of a 30F4013 to start with your flashforth. The goal is to run it on a PIC24F16KA101 (102) (one of the new XLPs). So can you support me with infos about the memory map. The Mplab simulator stops at line 204:
__AddressError:
__StackError:
__MathError:
and I don't know where the error occurs (I have not much experience with the simulator, I prefer hardware with a debugger).
A few years ago (about 17) I wrote a Crosscompiler (Hosted on a Macintosh - Forthmacs) for a 16bit Transputer and 1981 / 82 a Forth for 6809 - so I think I'll try it with the microchip controllers.
Bye,
Michael
Which processor are you simulating ?
I can run the 4013 in the simulator and it does not go to the interrupt vectors.
About the special symbols...
__AddressError:
__StackError:
__MathError:
These are defined in the linker file (.gld) and used as target adresses in the interrupt vector tables (IVT / AIVT) .
To do this project you need to read the datasheet and the programmers reference manual.
Programmers Reference Manual
http://ww1.microchip.com/downloads/en/DeviceDoc/70157C.pdf
Cheers Mikael
24FJ16GA002 - the configuration FOSC FWDT FBORPOR FGS in ff30.inc is commented out - also for test - the address NVMADR in the sourcefile
ah - it is an addresserror
dsPIC33FJ128MC804 same as 24FJ16GA002 - so I think after changeing the memory allocation and Flashroutine it will work
The CPU part of the PIC24 and 33 are pretty similar so I quess the same code
should work , as long as the memory map and configuration bits are taken care of.
Is the UART the same for PIC30 and 24/33 ? If not, maybe some work is needed there also.
Mikael
I was checking the PIC24F16KA101 (102) datasheet.
It turns out to be an excellent platform for FlashForth.
It has EEPROM and a 96 byte flash erase block size.
FF for the dsPIC30 should be easy to port to this new
Microchip processor family.
Have you considered FlashForth for the XGameStation boards?
There are 2 boards currently shipping that use the PIC24.
The XGS PIC 16 uses the PIC24HJ256GP206 running at 40MHz. The board has connectors and drivers for PS2, VGA, NTSC, Audio, serial, Micro SD card, SPI, I2C and NES compatible DB9. It is a bit bigger than a credit card.
http://www.xgamestation.com/view_product.php?id=47
The other board, The Chameleon PIC, is nearly the same (PS2, VGA, NTSC, Audio, mini USB, ISP and other breakouts). What differs is that it uses the PIC24HJ128GP502 (40MHz) and it has a Propeller chip onboard too !!!
http://www.xgamestation.com/view_product.php?id=52
http://chameleon-dev.com/
I already own one of these boards and would LOVE to have FlashForth on it !!!
TheJ
Hi,
Those pic24hj chips have no eeprom and the flashbuffersize is 1,5 Kbytes. So as I have mentioned in some earlier posts, a redesign is needed for getting FF to work on those.
Does the XGS come with a bootloader ? I suppose you would like to keep the bootloader.
If so, perhaps a version that works with the bootloader could be worth looking into.
Does the hypotethical bootloader allow the application code to write into the flash ?
Hello,
I am about to assemble a DsPIC33FJ256GP506A (256KByte Flash, 16KByte Ram).
I came accros Flash Forth and think it will work well with the board.
The board I have built to emulate an old ISA multi I/O board that had 24 digital and 8 analog on a 40 pin header.
I have the unused pins on a seperate header.
There is USB(FTDI), (RS232 or RS485) and CAN BUS available for comms.
I will try making the necesery changes to FF for this DsPIC33.
Regards Peter
Hi Peter,
Thats great,
I have actually started by writing some new code for the flash handling of the PIC24.
It should have the same flash handling as the PIC33.
I can send that to you as a base, it was running in the simulator. already last spring.
Mikael
Hello,
I have a couple of projects I need to produce with the PIC24F series micro controller.
I am like to in Forth for doing the projects.
I am willing to port the FlashForth to the PIC24.
If anyone is proceeding with such, I am willing to help.
I have serveral years experience (over 15) with MVP forth and LMI forth, mostly 8086 based system.
If anyone has started porting forth for the PIC24 I am willing to help out (beats starting from ground zero).
Please let me know if someone has began converting the PIC18 to execute on the PIC24.
If you look closely, you will notice that FlashForth supports PIC24 already :-)
Mike
I may be missing something. PIC18 is an eight bit system while PIC24 is a sixteen bit hardware.
Are you saying that all I have to do is configure MPLAB IDE as a PIC24 device and it will compile a kernal for PIC24?
I looked through the FlashForth kernal and as far as I can tell, there are not any config files for the PIC24.
I find this hard to believe, can you provide a bit more detail?
Thank you for your responce.
Have you seen this ?
http://flashforth.sourceforge.net/
Mike
When you are ready to download FlashForth for the PIC24,
be sure to click on "Browse All Files" on the Source Forge - FlashForth page,
then select "flashforth_24-30-33"
FF4.8.zip is the latest for the PIC24.
Pete
Mike, Pete,
Downloaded FF4.8 and generated hex file using MPLAB IDE.
Will flash it tonight and give it a try.
Thanks to both of you for your help.
Gene
Pete, Mike,
I compiled the original source but changed the target processor to PIC2464GA102. The compile did not show any errors. Then I tried to determine which physical I/O was being used by the Forth system. The 'p24fj_config.inc" file did not have U1RXPIN, PRINR18VAL OR U1TXPIN declared. Also in the 'p24fj_config.inc" file the are some baud rate calculations that use an undeclared constant named "FREQ". At the end of the file these calculations are executed again and "FREQ" is replaced with "FCY" which is the correct constant which was declared earlier in the file. I looked in the "p24f_config.inc" file and the UART #1 pins where defined. These pins are available on the PIC24FJ64GA102 so I an going to add them to the "p24f_conif.inc" file. Don't know if I will be able to get back to this project until the weekend.
Me and apparently nobody else either has put FF on on the FJ series.
I have used the HJ series for developing the pic24 code.
It also also been run on the dsPIC30 and dsPIC33.
Lets hope it works by adding those config items.
Mike
Mike;
I'm new to this product family (p24/33) but have a very large potential application for ff on p24/33. Any help at all in shortening my learning curver would be greatly welcomed and will hasten the deployment of this very hi volume app.
svpainter13
I'm interested in putting Forth on the PIC24FJ256GA106, however, I have no experience with the Microchip MPLAB tools. Is there a tutorial available that would get me over this 'little hurdle'? My preference is to dive into Forth in the PIC and not take too much time getting there.
Any help is greatly appreciated!
Regards,
Michael
K6MLE
Its difficult to make a generic instruction.
For your chip some reading of the datasheet
and some adaptation may be needed.
The PIC24FJ256GA106 appears to need a different configuration than the
one present in the p24fj_config.inc file.
Not all FJ series chips are born compatible :-(
At least the fixes mentioned by 'kgene' are needed.
Also the flash erase/write block sizes are different.
There could be other differences also.
UART1 is default for the operator task.
In general you need to install MPLAB and open the FF.mcw workspace file.
You will need to add the linker file path to the project library path.
With F10 you can compile the project and generate a hex file.
The hex file is programmed with for example pickit2 to the target.
Mike
Hi all,
Gheesh, been a long time since visiting. I'm thinking of bringing in an "MPLAB Starter Kit for PIC24H MCUs Part Number: DM240021" to fiddle with.
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en539553
I set the device type then added "p24HJ128GP504.gld" to the FF-4.8 project, ja pöh, I have a .hex looking for a place to live. :)
I'm wondering if anyone has had any first hand experience that would be worth sharing w/ this kit or just the MCU for that matter?
Oh and, wow Mike, looks like you've been very busy indeed. Gratz on the expansion of flashforth!