PubInv / NASA-COG

A control system for a highly reliable ceramic oxygen concentrator developed by NASA
GNU Affero General Public License v3.0
1 stars 3 forks source link

Add Machine configuration script to Makefile #204

Closed LokiMetaSmith closed 1 year ago

LokiMetaSmith commented 1 year ago

Machine configuration script should allow for:

gmulligan commented 1 year ago

I'm not sure what of this I'm supposed to do... The MAC address is hard-coded into the Ethernet Board.

RobertLRead commented 1 year ago

I don't think this should be assigned to you.

On Tue, Sep 5, 2023 at 11:56 AM Geoff Mulligan @.***> wrote:

I'm not sure what of this I'm supposed to do... The MAC address is hard-coded into the Ethernet Board.

— Reply to this email directly, view it on GitHub https://github.com/PubInv/NASA-COG/issues/204#issuecomment-1706978359, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABINEH3FUK7GB3XJSOXBPIDXY5KVNANCNFSM6AAAAAA4MBZQOA . You are receiving this because you were assigned.Message ID: @.***>

-- Robert L. Read, PhD Twitter: @RobertLeeRead @pubinvention Public Invention: https://www.pubinv.org Join Our Mailing list: @. YouTube: https://www.youtube.com/channel/UCJQg_dkDY3KTP1ybugYwReg Medium: @.

gmulligan commented 1 year ago

OOPS my mistake! The MAC address is assigned on the ethernet board by the code and this should be separated into a config file and not buried inside the udp task library.

BUT we need to figure out how to assign mac addresses!!!!!

gmulligan commented 1 year ago

also Lawrence is right, the pinouts for the ethernet and CS should be also pulled into a separate config.h or some such. But I don't think I'm qualified to make these changes.

ForrestErickson commented 1 year ago

Regarding, "The MAC address is hard-coded into the Ethernet Board." and then "OOPS my mistake! The MAC address is assigned on the ethernet board by the code"

It is easy to get this confused. I would have never guessed that the shield did not come with a MAC assigned by the manufacturer.

Where is there documentation on the ethernet shield to which we can refer?

RobertLRead commented 1 year ago

I think @gmulligan should answer this.

ForrestErickson commented 1 year ago

If the manufacturer does not provide a MAC address and if you want to sell a product and insure you do not use an address that belongs to some other entity, you must purchase MAC addresses. The IEE sells them. If I remember correctly this is going to be the smallest increment, MAC Address Block Small (MA-S), https://standards.ieee.org/products-programs/regauth/oui36/

The cost is $830 for a range of 4096 addresses (the 12 LSB are assigned by the manufacturer) or about $0.20 each.

ForrestErickson commented 1 year ago

Lee is not sure he understands / agrees with this request. Lee's difficulty is because of several things. One is unfamiliarity with make files and how they might be used to configure firmware. Second, at least the item, Serial Number, in the list above is not appropriate for user entry at compile time . A serial number should be added into an assembled unit way after code is compiled and released and then loaded into a unit. This means serial number gets stored in the Due Flash.

I suggest this issue should have a more descriptive name reflective of the scope to which a Makefile is appropriate.

Regarding, "Defining pinout in one location" I would think this definition needs to be very visible to everyone using the code so that we can be sure we understand the pinout as we do the things we need to do, Hardware design, system test, firmware development and so on. Somewhere where a Control Shift F (for project find) will return useful results.

LokiMetaSmith commented 1 year ago

This has been addressed with calling separate machine hal defines, for example, class Stage2HAL : public MachineHAL { as defined in stage2_hal.h

in platformio.ini the build flag -D STAGE2_HEATER=1 selects relevant definitions

RobertLRead commented 1 year ago

Although there are possibly more enhancements to be made to way configuration is done, I'm closing this as substantially completed.